home *** CD-ROM | disk | FTP | other *** search
Emacs Compiled Lisp | 1992-06-03 | 38.3 KB |
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was processed as: Emacs Compiled Lisp
(other/emacsCompiledLisp).
This format is not currently supported by dexvert.
Confidence | Program | Detection | Match Type | Support
|
---|
1%
| dexvert
| Emacs Compiled Lisp (other/emacsCompiledLisp)
| magic
| Unsupported |
100%
| file
| Emacs v18 byte-compiled Lisp data
| default
| |
99%
| file
| data
| default
| |
100%
| gt2
| Kopftext: '(defun open-line (arg) '
| default (weak)
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 0a 28 64 65 66 75 6e 20 | 6f 70 65 6e 2d 6c 69 6e |.(defun |open-lin|
|00000010| 65 20 28 61 72 67 29 20 | 22 5c 0a 49 6e 73 65 72 |e (arg) |"\.Inser|
|00000020| 74 20 61 20 6e 65 77 6c | 69 6e 65 20 61 6e 64 20 |t a newl|ine and |
|00000030| 6c 65 61 76 65 20 70 6f | 69 6e 74 20 62 65 66 6f |leave po|int befo|
|00000040| 72 65 20 69 74 2e 0a 57 | 69 74 68 20 61 72 67 2c |re it..W|ith arg,|
|00000050| 20 69 6e 73 65 72 74 73 | 20 74 68 61 74 20 6d 61 | inserts| that ma|
|00000060| 6e 79 20 6e 65 77 6c 69 | 6e 65 73 2e 22 20 28 69 |ny newli|nes." (i|
|00000070| 6e 74 65 72 61 63 74 69 | 76 65 20 22 2a 70 22 29 |nteracti|ve "*p")|
|00000080| 20 28 62 79 74 65 2d 63 | 6f 64 65 20 22 c2 88 6e | (byte-c|ode "..n|
|00000090| 85 08 00 6f 3f 18 08 85 | 10 00 c3 c4 21 88 09 c5 |...o?...|....!...|
|000000a0| 56 85 26 00 c6 63 88 60 | 53 62 88 09 53 89 11 88 |V.&..c.`|Sb..S...|
|000000b0| 82 11 00 88 08 85 2e 00 | c3 c7 21 29 87 22 20 5b |........|..!)." [|
|000000c0| 66 6c 61 67 20 61 72 67 | 20 6e 69 6c 20 66 6f 72 |flag arg| nil for|
|000000d0| 77 61 72 64 2d 63 68 61 | 72 20 2d 31 20 30 20 31 |ward-cha|r -1 0 1|
|000000e0| 30 20 31 5d 20 34 29 29 | 0a 0a 28 64 65 66 75 6e |0 1] 4))|..(defun|
|000000f0| 20 73 70 6c 69 74 2d 6c | 69 6e 65 20 6e 69 6c 20 | split-l|ine nil |
|00000100| 22 5c 0a 53 70 6c 69 74 | 20 63 75 72 72 65 6e 74 |"\.Split| current|
|00000110| 20 6c 69 6e 65 2c 20 6d | 6f 76 69 6e 67 20 70 6f | line, m|oving po|
|00000120| 72 74 69 6f 6e 20 62 65 | 79 6f 6e 64 20 70 6f 69 |rtion be|yond poi|
|00000130| 6e 74 20 76 65 72 74 69 | 63 61 6c 6c 79 20 64 6f |nt verti|cally do|
|00000140| 77 6e 2e 22 20 28 69 6e | 74 65 72 61 63 74 69 76 |wn." (in|teractiv|
|00000150| 65 20 22 2a 22 29 20 28 | 62 79 74 65 2d 63 6f 64 |e "*") (|byte-cod|
|00000160| 65 20 22 c2 88 c3 c4 21 | 88 69 60 19 18 c5 63 88 |e "....!|.i`...c.|
|00000170| c6 08 c7 5c 22 88 09 62 | 2a 87 22 20 5b 63 6f 6c |...\"..b|*." [col|
|00000180| 20 70 6f 73 20 6e 69 6c | 20 73 6b 69 70 2d 63 68 | pos nil| skip-ch|
|00000190| 61 72 73 2d 66 6f 72 77 | 61 72 64 20 22 20 09 22 |ars-forw|ard " ."|
|000001a0| 20 31 30 20 69 6e 64 65 | 6e 74 2d 74 6f 20 30 5d | 10 inde|nt-to 0]|
|000001b0| 20 34 29 29 0a 0a 28 64 | 65 66 75 6e 20 71 75 6f | 4))..(d|efun quo|
|000001c0| 74 65 64 2d 69 6e 73 65 | 72 74 20 28 61 72 67 29 |ted-inse|rt (arg)|
|000001d0| 20 22 5c 0a 52 65 61 64 | 20 6e 65 78 74 20 69 6e | "\.Read| next in|
|000001e0| 70 75 74 20 63 68 61 72 | 61 63 74 65 72 20 61 6e |put char|acter an|
|000001f0| 64 20 69 6e 73 65 72 74 | 20 69 74 2e 0a 55 73 65 |d insert| it..Use|
|00000200| 66 75 6c 20 66 6f 72 20 | 69 6e 73 65 72 74 69 6e |ful for |insertin|
|00000210| 67 20 63 6f 6e 74 72 6f | 6c 20 63 68 61 72 61 63 |g contro|l charac|
|00000220| 74 65 72 73 2e 0a 59 6f | 75 20 6d 61 79 20 61 6c |ters..Yo|u may al|
|00000230| 73 6f 20 74 79 70 65 20 | 75 70 20 74 6f 20 33 20 |so type |up to 3 |
|00000240| 6f 63 74 61 6c 20 64 69 | 67 69 74 73 2c 20 74 6f |octal di|gits, to|
|00000250| 20 69 6e 73 65 72 74 20 | 61 20 63 68 61 72 61 63 | insert |a charac|
|00000260| 74 65 72 20 77 69 74 68 | 20 74 68 61 74 20 63 6f |ter with| that co|
|00000270| 64 65 22 20 28 69 6e 74 | 65 72 61 63 74 69 76 65 |de" (int|eractive|
|00000280| 20 22 2a 70 22 29 20 28 | 62 79 74 65 2d 63 6f 64 | "*p") (|byte-cod|
|00000290| 65 20 22 c2 88 c3 20 18 | 09 c4 56 85 16 00 08 63 |e "... .|..V....c|
|000002a0| 88 09 53 89 11 88 82 05 | 00 29 87 22 20 5b 63 68 |..S.....|.)." [ch|
|000002b0| 61 72 20 61 72 67 20 6e | 69 6c 20 72 65 61 64 2d |ar arg n|il read-|
|000002c0| 71 75 6f 74 65 64 2d 63 | 68 61 72 20 30 5d 20 34 |quoted-c|har 0] 4|
|000002d0| 29 29 0a 0a 28 64 65 66 | 75 6e 20 64 65 6c 65 74 |))..(def|un delet|
|000002e0| 65 2d 69 6e 64 65 6e 74 | 61 74 69 6f 6e 20 28 26 |e-indent|ation (&|
|000002f0| 6f 70 74 69 6f 6e 61 6c | 20 61 72 67 29 20 22 5c |optional| arg) "\|
|00000300| 0a 4a 6f 69 6e 20 74 68 | 69 73 20 6c 69 6e 65 20 |.Join th|is line |
|00000310| 74 6f 20 70 72 65 76 69 | 6f 75 73 20 61 6e 64 20 |to previ|ous and |
|00000320| 66 69 78 20 75 70 20 77 | 68 69 74 65 73 70 61 63 |fix up w|hitespac|
|00000330| 65 20 61 74 20 6a 6f 69 | 6e 2e 0a 57 69 74 68 20 |e at joi|n..With |
|00000340| 61 72 67 75 6d 65 6e 74 | 2c 20 6a 6f 69 6e 20 74 |argument|, join t|
|00000350| 68 69 73 20 6c 69 6e 65 | 20 74 6f 20 66 6f 6c 6c |his line| to foll|
|00000360| 6f 77 69 6e 67 20 6c 69 | 6e 65 2e 22 20 28 69 6e |owing li|ne." (in|
|00000370| 74 65 72 61 63 74 69 76 | 65 20 22 2a 50 22 29 20 |teractiv|e "*P") |
|00000380| 28 62 79 74 65 2d 63 6f | 64 65 20 22 c1 88 c2 20 |(byte-co|de "... |
|00000390| 88 08 85 0c 00 c3 c4 21 | 88 68 c5 3d 85 1b 00 c6 |.......!|.h.=....|
|000003a0| 60 60 53 5c 22 88 c7 20 | 87 22 20 5b 61 72 67 20 |``S\".. |." [arg |
|000003b0| 6e 69 6c 20 62 65 67 69 | 6e 6e 69 6e 67 2d 6f 66 |nil begi|nning-of|
|000003c0| 2d 6c 69 6e 65 20 66 6f | 72 77 61 72 64 2d 6c 69 |-line fo|rward-li|
|000003d0| 6e 65 20 31 20 31 30 20 | 64 65 6c 65 74 65 2d 72 |ne 1 10 |delete-r|
|000003e0| 65 67 69 6f 6e 20 66 69 | 78 75 70 2d 77 68 69 74 |egion fi|xup-whit|
|000003f0| 65 73 70 61 63 65 5d 20 | 35 29 29 0a 0a 28 64 65 |espace] |5))..(de|
|00000400| 66 75 6e 20 66 69 78 75 | 70 2d 77 68 69 74 65 73 |fun fixu|p-whites|
|00000410| 70 61 63 65 20 6e 69 6c | 20 22 5c 0a 46 69 78 75 |pace nil| "\.Fixu|
|00000420| 70 20 77 68 69 74 65 20 | 73 70 61 63 65 20 62 65 |p white |space be|
|00000430| 74 77 65 65 6e 20 6f 62 | 6a 65 63 74 73 20 61 72 |tween ob|jects ar|
|00000440| 6f 75 6e 64 20 70 6f 69 | 6e 74 2e 0a 4c 65 61 76 |ound poi|nt..Leav|
|00000450| 65 20 6f 6e 65 20 73 70 | 61 63 65 20 6f 72 20 6e |e one sp|ace or n|
|00000460| 6f 6e 65 2c 20 61 63 63 | 6f 72 64 69 6e 67 20 74 |one, acc|ording t|
|00000470| 6f 20 74 68 65 20 63 6f | 6e 74 65 78 74 2e 22 20 |o the co|ntext." |
|00000480| 28 69 6e 74 65 72 61 63 | 74 69 76 65 20 22 2a 22 |(interac|tive "*"|
|00000490| 29 20 28 62 79 74 65 2d | 63 6f 64 65 20 22 c0 88 |) (byte-|code "..|
|000004a0| 8a c1 20 88 c2 c3 21 86 | 15 00 8a c4 c5 21 88 c2 |.. ...!.|.....!..|
|000004b0| c6 21 29 83 1c 00 c0 82 | 1e 00 c7 63 29 87 22 20 |.!).....|...c)." |
|000004c0| 5b 6e 69 6c 20 64 65 6c | 65 74 65 2d 68 6f 72 69 |[nil del|ete-hori|
|000004d0| 7a 6f 6e 74 61 6c 2d 73 | 70 61 63 65 20 6c 6f 6f |zontal-s|pace loo|
|000004e0| 6b 69 6e 67 2d 61 74 20 | 22 5e 5c 5c 7c 5c 5c 73 |king-at |"^\\|\\s|
|000004f0| 29 5c 5c 7c 24 22 20 66 | 6f 72 77 61 72 64 2d 63 |)\\|$" f|orward-c|
|00000500| 68 61 72 20 2d 31 20 22 | 5c 5c 73 28 5c 5c 7c 5c |har -1 "|\\s(\\|\|
|00000510| 5c 73 27 22 20 33 32 5d | 20 35 29 29 0a 0a 28 64 |\s'" 32]| 5))..(d|
|00000520| 65 66 75 6e 20 64 65 6c | 65 74 65 2d 68 6f 72 69 |efun del|ete-hori|
|00000530| 7a 6f 6e 74 61 6c 2d 73 | 70 61 63 65 20 6e 69 6c |zontal-s|pace nil|
|00000540| 20 22 5c 0a 44 65 6c 65 | 74 65 20 61 6c 6c 20 73 | "\.Dele|te all s|
|00000550| 70 61 63 65 73 20 61 6e | 64 20 74 61 62 73 20 61 |paces an|d tabs a|
|00000560| 72 6f 75 6e 64 20 70 6f | 69 6e 74 2e 22 20 28 69 |round po|int." (i|
|00000570| 6e 74 65 72 61 63 74 69 | 76 65 20 22 2a 22 29 20 |nteracti|ve "*") |
|00000580| 28 62 79 74 65 2d 63 6f | 64 65 20 22 c0 88 c1 c2 |(byte-co|de "....|
|00000590| 21 88 c3 60 c4 c2 21 88 | 60 5c 22 87 22 20 5b 6e |!..`..!.|`\"." [n|
|000005a0| 69 6c 20 73 6b 69 70 2d | 63 68 61 72 73 2d 62 61 |il skip-|chars-ba|
|000005b0| 63 6b 77 61 72 64 20 22 | 20 09 22 20 64 65 6c 65 |ckward "| ." dele|
|000005c0| 74 65 2d 72 65 67 69 6f | 6e 20 73 6b 69 70 2d 63 |te-regio|n skip-c|
|000005d0| 68 61 72 73 2d 66 6f 72 | 77 61 72 64 5d 20 35 29 |hars-for|ward] 5)|
|000005e0| 29 0a 0a 28 64 65 66 75 | 6e 20 6a 75 73 74 2d 6f |)..(defu|n just-o|
|000005f0| 6e 65 2d 73 70 61 63 65 | 20 6e 69 6c 20 22 5c 0a |ne-space| nil "\.|
|00000600| 44 65 6c 65 74 65 20 61 | 6c 6c 20 73 70 61 63 65 |Delete a|ll space|
|00000610| 73 20 61 6e 64 20 74 61 | 62 73 20 61 72 6f 75 6e |s and ta|bs aroun|
|00000620| 64 20 70 6f 69 6e 74 2c | 20 6c 65 61 76 69 6e 67 |d point,| leaving|
|00000630| 20 6f 6e 65 20 73 70 61 | 63 65 2e 22 20 28 69 6e | one spa|ce." (in|
|00000640| 74 65 72 61 63 74 69 76 | 65 20 22 2a 22 29 20 28 |teractiv|e "*") (|
|00000650| 62 79 74 65 2d 63 6f 64 | 65 20 22 c0 88 c1 c2 21 |byte-cod|e "....!|
|00000660| 88 67 c3 55 83 12 00 c4 | c5 21 82 14 00 c3 63 88 |.g.U....|.!....c.|
|00000670| c6 60 c7 c2 21 88 60 5c | 22 87 22 20 5b 6e 69 6c |.`..!.`\|"." [nil|
|00000680| 20 73 6b 69 70 2d 63 68 | 61 72 73 2d 62 61 63 6b | skip-ch|ars-back|
|00000690| 77 61 72 64 20 22 20 09 | 22 20 33 32 20 66 6f 72 |ward " .|" 32 for|
|000006a0| 77 61 72 64 2d 63 68 61 | 72 20 31 20 64 65 6c 65 |ward-cha|r 1 dele|
|000006b0| 74 65 2d 72 65 67 69 6f | 6e 20 73 6b 69 70 2d 63 |te-regio|n skip-c|
|000006c0| 68 61 72 73 2d 66 6f 72 | 77 61 72 64 5d 20 36 29 |hars-for|ward] 6)|
|000006d0| 29 0a 0a 28 64 65 66 75 | 6e 20 64 65 6c 65 74 65 |)..(defu|n delete|
|000006e0| 2d 62 6c 61 6e 6b 2d 6c | 69 6e 65 73 20 6e 69 6c |-blank-l|ines nil|
|000006f0| 20 22 5c 0a 4f 6e 20 62 | 6c 61 6e 6b 20 6c 69 6e | "\.On b|lank lin|
|00000700| 65 2c 20 64 65 6c 65 74 | 65 20 61 6c 6c 20 73 75 |e, delet|e all su|
|00000710| 72 72 6f 75 6e 64 69 6e | 67 20 62 6c 61 6e 6b 20 |rroundin|g blank |
|00000720| 6c 69 6e 65 73 2c 20 6c | 65 61 76 69 6e 67 20 6a |lines, l|eaving j|
|00000730| 75 73 74 20 6f 6e 65 2e | 0a 4f 6e 20 69 73 6f 6c |ust one.|.On isol|
|00000740| 61 74 65 64 20 62 6c 61 | 6e 6b 20 6c 69 6e 65 2c |ated bla|nk line,|
|00000750| 20 64 65 6c 65 74 65 20 | 74 68 61 74 20 6f 6e 65 | delete |that one|
|00000760| 2e 0a 4f 6e 20 6e 6f 6e | 62 6c 61 6e 6b 20 6c 69 |..On non|blank li|
|00000770| 6e 65 2c 20 64 65 6c 65 | 74 65 20 61 6c 6c 20 62 |ne, dele|te all b|
|00000780| 6c 61 6e 6b 20 6c 69 6e | 65 73 20 74 68 61 74 20 |lank lin|es that |
|00000790| 66 6f 6c 6c 6f 77 20 69 | 74 2e 22 20 28 69 6e 74 |follow i|t." (int|
|000007a0| 65 72 61 63 74 69 76 65 | 20 22 2a 22 29 20 28 62 |eractive| "*") (b|
|000007b0| 79 74 65 2d 63 6f 64 65 | 20 22 c2 88 c2 c2 19 18 |yte-code| "......|
|000007c0| 8a c4 20 88 c5 c6 21 89 | 10 88 08 85 27 00 c5 c7 |.. ...!.|....'...|
|000007d0| 21 3f 85 27 00 6f 86 27 | 00 c8 c9 21 88 c5 c6 21 |!?.'.o.'|...!...!|
|000007e0| 3f 89 11 29 88 08 85 4e | 00 c4 20 88 09 85 39 00 |?..)...N|.. ...9.|
|000007f0| c8 ca 21 88 cb 60 cc cd | c2 c3 23 83 4c 00 c8 ca |..!..`..|..#.L...|
|00000800| 21 88 60 82 4d 00 65 5c | 22 88 08 85 54 00 09 3f |!.`.M.e\|"...T..?|
|00000810| 85 74 00 8a ce 20 88 c8 | ca 21 88 cb 60 cf cd c2 |.t... ..|.!..`...|
|00000820| c3 23 83 71 00 c4 20 88 | 60 82 72 00 64 5c 22 29 |.#.q.. .|`.r.d\")|
|00000830| 2a 87 22 20 5b 74 68 69 | 73 62 6c 61 6e 6b 20 73 |*." [thi|sblank s|
|00000840| 69 6e 67 6c 65 62 6c 61 | 6e 6b 20 6e 69 6c 20 74 |inglebla|nk nil t|
|00000850| 20 62 65 67 69 6e 6e 69 | 6e 67 2d 6f 66 2d 6c 69 | beginni|ng-of-li|
|00000860| 6e 65 20 6c 6f 6f 6b 69 | 6e 67 2d 61 74 20 22 5b |ne looki|ng-at "[|
|00000870| 20 09 5d 2a 24 22 20 22 | 5b 20 09 5d 2a 0a 5b 20 | .]*$" "|[ .]*.[ |
|00000880| 09 5d 2a 24 22 20 66 6f | 72 77 61 72 64 2d 6c 69 |.]*$" fo|rward-li|
|00000890| 6e 65 20 2d 31 20 31 20 | 64 65 6c 65 74 65 2d 72 |ne -1 1 |delete-r|
|000008a0| 65 67 69 6f 6e 20 72 65 | 2d 73 65 61 72 63 68 2d |egion re|-search-|
|000008b0| 62 61 63 6b 77 61 72 64 | 20 22 5b 5e 20 09 0a 5d |backward| "[^ ..]|
|000008c0| 22 20 65 6e 64 2d 6f 66 | 2d 6c 69 6e 65 20 72 65 |" end-of|-line re|
|000008d0| 2d 73 65 61 72 63 68 2d | 66 6f 72 77 61 72 64 5d |-search-|forward]|
|000008e0| 20 31 38 29 29 0a 0a 28 | 64 65 66 75 6e 20 62 61 | 18))..(|defun ba|
|000008f0| 63 6b 2d 74 6f 2d 69 6e | 64 65 6e 74 61 74 69 6f |ck-to-in|dentatio|
|00000900| 6e 20 6e 69 6c 20 22 5c | 0a 4d 6f 76 65 20 70 6f |n nil "\|.Move po|
|00000910| 69 6e 74 20 74 6f 20 74 | 68 65 20 66 69 72 73 74 |int to t|he first|
|00000920| 20 6e 6f 6e 2d 77 68 69 | 74 65 73 70 61 63 65 20 | non-whi|tespace |
|00000930| 63 68 61 72 61 63 74 65 | 72 20 6f 6e 20 74 68 69 |characte|r on thi|
|00000940| 73 20 6c 69 6e 65 2e 22 | 20 28 69 6e 74 65 72 61 |s line."| (intera|
|00000950| 63 74 69 76 65 29 20 28 | 62 79 74 65 2d 63 6f 64 |ctive) (|byte-cod|
|00000960| 65 20 22 c0 88 c1 c2 21 | 88 c3 c4 21 87 22 20 5b |e "....!|...!." [|
|00000970| 6e 69 6c 20 62 65 67 69 | 6e 6e 69 6e 67 2d 6f 66 |nil begi|nning-of|
|00000980| 2d 6c 69 6e 65 20 31 20 | 73 6b 69 70 2d 63 68 61 |-line 1 |skip-cha|
|00000990| 72 73 2d 66 6f 72 77 61 | 72 64 20 22 20 09 22 5d |rs-forwa|rd " ."]|
|000009a0| 20 33 29 29 0a 0a 28 64 | 65 66 75 6e 20 6e 65 77 | 3))..(d|efun new|
|000009b0| 6c 69 6e 65 2d 61 6e 64 | 2d 69 6e 64 65 6e 74 20 |line-and|-indent |
|000009c0| 6e 69 6c 20 22 5c 0a 49 | 6e 73 65 72 74 20 61 20 |nil "\.I|nsert a |
|000009d0| 6e 65 77 6c 69 6e 65 2c | 20 74 68 65 6e 20 69 6e |newline,| then in|
|000009e0| 64 65 6e 74 20 61 63 63 | 6f 72 64 69 6e 67 20 74 |dent acc|ording t|
|000009f0| 6f 20 6d 61 6a 6f 72 20 | 6d 6f 64 65 2e 0a 49 6e |o major |mode..In|
|00000a00| 64 65 6e 74 61 74 69 6f | 6e 20 69 73 20 64 6f 6e |dentatio|n is don|
|00000a10| 65 20 75 73 69 6e 67 20 | 74 68 65 20 63 75 72 72 |e using |the curr|
|00000a20| 65 6e 74 20 69 6e 64 65 | 6e 74 2d 6c 69 6e 65 2d |ent inde|nt-line-|
|00000a30| 66 75 6e 63 74 69 6f 6e | 2e 0a 49 6e 20 70 72 6f |function|..In pro|
|00000a40| 67 72 61 6d 6d 69 6e 67 | 20 6c 61 6e 67 75 61 67 |gramming| languag|
|00000a50| 65 20 6d 6f 64 65 73 2c | 20 74 68 69 73 20 69 73 |e modes,| this is|
|00000a60| 20 74 68 65 20 73 61 6d | 65 20 61 73 20 54 41 42 | the sam|e as TAB|
|00000a70| 2e 0a 49 6e 20 73 6f 6d | 65 20 74 65 78 74 20 6d |..In som|e text m|
|00000a80| 6f 64 65 73 2c 20 77 68 | 65 72 65 20 54 41 42 20 |odes, wh|ere TAB |
|00000a90| 69 6e 73 65 72 74 73 20 | 61 20 74 61 62 2c 20 74 |inserts |a tab, t|
|00000aa0| 68 69 73 20 69 6e 64 65 | 6e 74 73 20 74 6f 20 74 |his inde|nts to t|
|00000ab0| 68 65 0a 73 70 65 63 69 | 66 69 65 64 20 6c 65 66 |he.speci|fied lef|
|00000ac0| 74 2d 6d 61 72 67 69 6e | 20 63 6f 6c 75 6d 6e 2e |t-margin| column.|
|00000ad0| 22 20 28 69 6e 74 65 72 | 61 63 74 69 76 65 20 22 |" (inter|active "|
|00000ae0| 2a 22 29 20 28 62 79 74 | 65 2d 63 6f 64 65 20 22 |*") (byt|e-code "|
|00000af0| c0 88 c1 60 c2 c3 21 88 | 60 5c 22 88 c4 63 88 c5 |...`..!.|`\"..c..|
|00000b00| 20 87 22 20 5b 6e 69 6c | 20 64 65 6c 65 74 65 2d | ." [nil| delete-|
|00000b10| 72 65 67 69 6f 6e 20 73 | 6b 69 70 2d 63 68 61 72 |region s|kip-char|
|00000b20| 73 2d 62 61 63 6b 77 61 | 72 64 20 22 20 09 22 20 |s-backwa|rd " ." |
|00000b30| 31 30 20 69 6e 64 65 6e | 74 2d 61 63 63 6f 72 64 |10 inden|t-accord|
|00000b40| 69 6e 67 2d 74 6f 2d 6d | 6f 64 65 5d 20 34 29 29 |ing-to-m|ode] 4))|
|00000b50| 0a 0a 28 64 65 66 75 6e | 20 72 65 69 6e 64 65 6e |..(defun| reinden|
|00000b60| 74 2d 74 68 65 6e 2d 6e | 65 77 6c 69 6e 65 2d 61 |t-then-n|ewline-a|
|00000b70| 6e 64 2d 69 6e 64 65 6e | 74 20 6e 69 6c 20 22 5c |nd-inden|t nil "\|
|00000b80| 0a 52 65 69 6e 64 65 6e | 74 20 63 75 72 72 65 6e |.Reinden|t curren|
|00000b90| 74 20 6c 69 6e 65 2c 20 | 69 6e 73 65 72 74 20 6e |t line, |insert n|
|00000ba0| 65 77 6c 69 6e 65 2c 20 | 74 68 65 6e 20 69 6e 64 |ewline, |then ind|
|00000bb0| 65 6e 74 20 74 68 65 20 | 6e 65 77 20 6c 69 6e 65 |ent the |new line|
|00000bc0| 2e 0a 49 6e 64 65 6e 74 | 61 74 69 6f 6e 20 6f 66 |..Indent|ation of|
|00000bd0| 20 62 6f 74 68 20 6c 69 | 6e 65 73 20 69 73 20 64 | both li|nes is d|
|00000be0| 6f 6e 65 20 61 63 63 6f | 72 64 69 6e 67 20 74 6f |one acco|rding to|
|00000bf0| 20 74 68 65 20 63 75 72 | 72 65 6e 74 20 6d 61 6a | the cur|rent maj|
|00000c00| 6f 72 20 6d 6f 64 65 2c | 0a 77 68 69 63 68 20 6d |or mode,|.which m|
|00000c10| 65 61 6e 73 20 74 68 61 | 74 20 74 68 65 20 63 75 |eans tha|t the cu|
|00000c20| 72 72 65 6e 74 20 76 61 | 6c 75 65 20 6f 66 20 69 |rrent va|lue of i|
|00000c30| 6e 64 65 6e 74 2d 6c 69 | 6e 65 2d 66 75 6e 63 74 |ndent-li|ne-funct|
|00000c40| 69 6f 6e 20 69 73 20 63 | 61 6c 6c 65 64 2e 0a 49 |ion is c|alled..I|
|00000c50| 6e 20 70 72 6f 67 72 61 | 6d 6d 69 6e 67 20 6c 61 |n progra|mming la|
|00000c60| 6e 67 75 61 67 65 20 6d | 6f 64 65 73 2c 20 74 68 |nguage m|odes, th|
|00000c70| 69 73 20 69 73 20 74 68 | 65 20 73 61 6d 65 20 61 |is is th|e same a|
|00000c80| 73 20 54 41 42 2e 0a 49 | 6e 20 73 6f 6d 65 20 74 |s TAB..I|n some t|
|00000c90| 65 78 74 20 6d 6f 64 65 | 73 2c 20 77 68 65 72 65 |ext mode|s, where|
|00000ca0| 20 54 41 42 20 69 6e 73 | 65 72 74 73 20 61 20 74 | TAB ins|erts a t|
|00000cb0| 61 62 2c 20 74 68 69 73 | 20 69 6e 64 65 6e 74 73 |ab, this| indents|
|00000cc0| 20 74 6f 20 74 68 65 0a | 73 70 65 63 69 66 69 65 | to the.|specifie|
|00000cd0| 64 20 6c 65 66 74 2d 6d | 61 72 67 69 6e 20 63 6f |d left-m|argin co|
|00000ce0| 6c 75 6d 6e 2e 22 20 28 | 69 6e 74 65 72 61 63 74 |lumn." (|interact|
|00000cf0| 69 76 65 20 22 2a 22 29 | 20 28 62 79 74 65 2d 63 |ive "*")| (byte-c|
|00000d00| 6f 64 65 20 22 c0 88 8a | c1 60 c2 c3 21 88 60 5c |ode "...|.`..!.`\|
|00000d10| 22 88 c4 20 29 88 c5 63 | 88 c4 20 87 22 20 5b 6e |".. )..c|.. ." [n|
|00000d20| 69 6c 20 64 65 6c 65 74 | 65 2d 72 65 67 69 6f 6e |il delet|e-region|
|00000d30| 20 73 6b 69 70 2d 63 68 | 61 72 73 2d 62 61 63 6b | skip-ch|ars-back|
|00000d40| 77 61 72 64 20 22 20 09 | 22 20 69 6e 64 65 6e 74 |ward " .|" indent|
|00000d50| 2d 61 63 63 6f 72 64 69 | 6e 67 2d 74 6f 2d 6d 6f |-accordi|ng-to-mo|
|00000d60| 64 65 20 31 30 5d 20 35 | 29 29 0a 0a 28 64 65 66 |de 10] 5|))..(def|
|00000d70| 75 6e 20 6b 69 6c 6c 2d | 66 6f 72 77 61 72 64 2d |un kill-|forward-|
|00000d80| 63 68 61 72 73 20 28 61 | 72 67 29 20 28 62 79 74 |chars (a|rg) (byt|
|00000d90| 65 2d 63 6f 64 65 20 22 | 08 3c 85 09 00 08 40 89 |e-code "|.<....@.|
|00000da0| 10 88 08 c1 3d 85 13 00 | c2 89 10 88 c3 60 60 08 |....=...|.....``.|
|00000db0| 5c 5c 5c 22 87 22 20 5b | 61 72 67 20 2d 20 2d 31 |\\\"." [|arg - -1|
|00000dc0| 20 6b 69 6c 6c 2d 72 65 | 67 69 6f 6e 5d 20 34 29 | kill-re|gion] 4)|
|00000dd0| 29 0a 0a 28 64 65 66 75 | 6e 20 6b 69 6c 6c 2d 62 |)..(defu|n kill-b|
|00000de0| 61 63 6b 77 61 72 64 2d | 63 68 61 72 73 20 28 61 |ackward-|chars (a|
|00000df0| 72 67 29 20 28 62 79 74 | 65 2d 63 6f 64 65 20 22 |rg) (byt|e-code "|
|00000e00| 08 3c 85 09 00 08 40 89 | 10 88 08 c1 3d 85 13 00 |.<....@.|....=...|
|00000e10| c2 89 10 88 c3 60 60 08 | 5a 5c 22 87 22 20 5b 61 |.....``.|Z\"." [a|
|00000e20| 72 67 20 2d 20 2d 31 20 | 6b 69 6c 6c 2d 72 65 67 |rg - -1 |kill-reg|
|00000e30| 69 6f 6e 5d 20 34 29 29 | 0a 0a 28 64 65 66 75 6e |ion] 4))|..(defun|
|00000e40| 20 62 61 63 6b 77 61 72 | 64 2d 64 65 6c 65 74 65 | backwar|d-delete|
|00000e50| 2d 63 68 61 72 2d 75 6e | 74 61 62 69 66 79 20 28 |-char-un|tabify (|
|00000e60| 61 72 67 20 26 6f 70 74 | 69 6f 6e 61 6c 20 6b 69 |arg &opt|ional ki|
|00000e70| 6c 6c 70 29 20 22 5c 0a | 44 65 6c 65 74 65 20 63 |llp) "\.|Delete c|
|00000e80| 68 61 72 61 63 74 65 72 | 73 20 62 61 63 6b 77 61 |haracter|s backwa|
|00000e90| 72 64 2c 20 63 68 61 6e | 67 69 6e 67 20 74 61 62 |rd, chan|ging tab|
|00000ea0| 73 20 69 6e 74 6f 20 73 | 70 61 63 65 73 2e 0a 44 |s into s|paces..D|
|00000eb0| 65 6c 65 74 65 20 41 52 | 47 20 63 68 61 72 73 2c |elete AR|G chars,|
|00000ec0| 20 61 6e 64 20 6b 69 6c | 6c 20 28 73 61 76 65 20 | and kil|l (save |
|00000ed0| 69 6e 20 6b 69 6c 6c 20 | 72 69 6e 67 29 20 69 66 |in kill |ring) if|
|00000ee0| 20 4b 49 4c 4c 50 20 69 | 73 20 6e 6f 6e 2d 6e 69 | KILLP i|s non-ni|
|00000ef0| 6c 2e 0a 49 6e 74 65 72 | 61 63 74 69 76 65 6c 79 |l..Inter|actively|
|00000f00| 2c 20 41 52 47 20 69 73 | 20 74 68 65 20 70 72 65 |, ARG is| the pre|
|00000f10| 66 69 78 20 61 72 67 20 | 28 64 65 66 61 75 6c 74 |fix arg |(default|
|00000f20| 20 31 29 0a 61 6e 64 20 | 4b 49 4c 4c 50 20 69 73 | 1).and |KILLP is|
|00000f30| 20 74 20 69 66 20 70 72 | 65 66 69 78 20 61 72 67 | t if pr|efix arg|
|00000f40| 20 69 73 20 77 61 73 20 | 73 70 65 63 69 66 69 65 | is was |specifie|
|00000f50| 64 2e 22 20 28 69 6e 74 | 65 72 61 63 74 69 76 65 |d." (int|eractive|
|00000f60| 20 22 2a 70 0a 50 22 29 | 20 28 62 79 74 65 2d 63 | "*p.P")| (byte-c|
|00000f70| 6f 64 65 20 22 c4 88 09 | 18 8a 08 c5 56 85 0d 00 |ode "...|....V...|
|00000f80| 6f 3f 85 38 00 68 c6 55 | 85 2b 00 69 1a c7 c8 21 |o?.8.h.U|.+.i...!|
|00000f90| 88 0a 69 5a 89 12 88 c9 | ca 0a 5c 22 88 cb cc 21 |..iZ....|..\"...!|
|00000fa0| 29 88 c7 c8 21 88 08 53 | 89 10 88 82 05 00 29 29 |)...!..S|......))|
|00000fb0| 88 cd 09 0b 5c 22 87 22 | 20 5b 63 6f 75 6e 74 20 |....\"."| [count |
|00000fc0| 61 72 67 20 63 6f 6c 20 | 6b 69 6c 6c 70 20 6e 69 |arg col |killp ni|
|00000fd0| 6c 20 30 20 39 20 66 6f | 72 77 61 72 64 2d 63 68 |l 0 9 fo|rward-ch|
|00000fe0| 61 72 20 2d 31 20 69 6e | 73 65 72 74 2d 63 68 61 |ar -1 in|sert-cha|
|00000ff0| 72 20 33 32 20 64 65 6c | 65 74 65 2d 63 68 61 72 |r 32 del|ete-char|
|00001000| 20 31 20 64 65 6c 65 74 | 65 2d 62 61 63 6b 77 61 | 1 delet|e-backwa|
|00001010| 72 64 2d 63 68 61 72 5d | 20 37 29 29 0a 0a 28 64 |rd-char]| 7))..(d|
|00001020| 65 66 75 6e 20 7a 61 70 | 2d 74 6f 2d 63 68 61 72 |efun zap|-to-char|
|00001030| 20 28 61 72 67 20 63 68 | 61 72 29 20 22 5c 0a 4b | (arg ch|ar) "\.K|
|00001040| 69 6c 6c 20 75 70 20 74 | 6f 20 28 62 75 74 20 6e |ill up t|o (but n|
|00001050| 6f 74 20 69 6e 63 6c 75 | 64 69 6e 67 29 20 41 52 |ot inclu|ding) AR|
|00001060| 47 27 74 68 20 6f 63 63 | 75 72 72 65 6e 63 65 20 |G'th occ|urrence |
|00001070| 6f 66 20 43 48 41 52 2e | 0a 47 6f 65 73 20 62 61 |of CHAR.|.Goes ba|
|00001080| 63 6b 77 61 72 64 20 69 | 66 20 41 52 47 20 69 73 |ckward i|f ARG is|
|00001090| 20 6e 65 67 61 74 69 76 | 65 3b 20 67 6f 65 73 20 | negativ|e; goes |
|000010a0| 74 6f 20 65 6e 64 20 6f | 66 20 62 75 66 66 65 72 |to end o|f buffer|
|000010b0| 20 69 66 20 43 48 41 52 | 20 6e 6f 74 20 66 6f 75 | if CHAR| not fou|
|000010c0| 6e 64 2e 22 20 28 69 6e | 74 65 72 61 63 74 69 76 |nd." (in|teractiv|
|000010d0| 65 20 22 2a 70 0a 63 5a | 61 70 20 74 6f 20 63 68 |e "*p.cZ|ap to ch|
|000010e0| 61 72 3a 20 22 29 20 28 | 62 79 74 65 2d 63 6f 64 |ar: ") (|byte-cod|
|000010f0| 65 20 22 c1 88 c4 60 c5 | c6 08 21 c1 c2 0b 24 83 |e "...`.|..!...$.|
|00001100| 5c 22 00 0b c7 56 83 1a | 00 60 53 82 1c 00 60 54 |\"...V..|.`S...`T|
|00001110| 62 88 60 82 2d 00 0b c7 | 56 83 2c 00 64 82 2d 00 |b.`.-...|V.,.d.-.|
|00001120| 65 5c 22 87 22 20 5b 63 | 68 61 72 20 6e 69 6c 20 |e\"." [c|har nil |
|00001130| 74 20 61 72 67 20 6b 69 | 6c 6c 2d 72 65 67 69 6f |t arg ki|ll-regio|
|00001140| 6e 20 73 65 61 72 63 68 | 2d 66 6f 72 77 61 72 64 |n search|-forward|
|00001150| 20 63 68 61 72 2d 74 6f | 2d 73 74 72 69 6e 67 20 | char-to|-string |
|00001160| 30 5d 20 38 29 29 0a 0a | 28 64 65 66 75 6e 20 62 |0] 8))..|(defun b|
|00001170| 65 67 69 6e 6e 69 6e 67 | 2d 6f 66 2d 62 75 66 66 |eginning|-of-buff|
|00001180| 65 72 20 28 26 6f 70 74 | 69 6f 6e 61 6c 20 61 72 |er (&opt|ional ar|
|00001190| 67 29 20 22 5c 0a 4d 6f | 76 65 20 70 6f 69 6e 74 |g) "\.Mo|ve point|
|000011a0| 20 74 6f 20 74 68 65 20 | 62 65 67 69 6e 6e 69 6e | to the |beginnin|
|000011b0| 67 20 6f 66 20 74 68 65 | 20 62 75 66 66 65 72 3b |g of the| buffer;|
|000011c0| 20 6c 65 61 76 65 20 6d | 61 72 6b 20 61 74 20 70 | leave m|ark at p|
|000011d0| 72 65 76 69 6f 75 73 20 | 70 6f 73 69 74 69 6f 6e |revious |position|
|000011e0| 2e 0a 57 69 74 68 20 61 | 72 67 20 4e 2c 20 70 75 |..With a|rg N, pu|
|000011f0| 74 20 70 6f 69 6e 74 20 | 4e 2f 31 30 20 6f 66 20 |t point |N/10 of |
|00001200| 74 68 65 20 77 61 79 20 | 66 72 6f 6d 20 74 68 65 |the way |from the|
|00001210| 20 74 72 75 65 20 62 65 | 67 69 6e 6e 69 6e 67 2e | true be|ginning.|
|00001220| 0a 44 6f 6e 27 74 20 75 | 73 65 20 74 68 69 73 20 |.Don't u|se this |
|00001230| 69 6e 20 4c 69 73 70 20 | 70 72 6f 67 72 61 6d 73 |in Lisp |programs|
|00001240| 21 0a 28 67 6f 74 6f 2d | 63 68 61 72 20 28 70 6f |!.(goto-|char (po|
|00001250| 69 6e 74 2d 6d 69 6e 29 | 29 20 69 73 20 66 61 73 |int-min)|) is fas|
|00001260| 74 65 72 20 61 6e 64 20 | 64 6f 65 73 20 6e 6f 74 |ter and |does not|
|00001270| 20 73 65 74 20 74 68 65 | 20 6d 61 72 6b 2e 22 20 | set the| mark." |
|00001280| 28 69 6e 74 65 72 61 63 | 74 69 76 65 20 22 50 22 |(interac|tive "P"|
|00001290| 29 20 28 62 79 74 65 2d | 63 6f 64 65 20 22 c1 88 |) (byte-|code "..|
|000012a0| c2 20 88 08 83 2c 00 c3 | 20 c4 56 83 1d 00 c5 c6 |. ...,..| .V.....|
|000012b0| 08 21 c7 c3 20 c8 5c 22 | 5c 22 82 29 00 c7 c8 c5 |.!.. .\"|\".)....|
|000012c0| c3 20 c6 08 21 5c 22 5c | 5c c8 5c 22 82 2d 00 65 |. ..!\"\|\.\".-.e|
|000012d0| 62 88 08 85 36 00 c9 ca | 21 87 22 20 5b 61 72 67 |b...6...|!." [arg|
|000012e0| 20 6e 69 6c 20 70 75 73 | 68 2d 6d 61 72 6b 20 62 | nil pus|h-mark b|
|000012f0| 75 66 66 65 72 2d 73 69 | 7a 65 20 31 30 30 30 30 |uffer-si|ze 10000|
|00001300| 20 2a 20 70 72 65 66 69 | 78 2d 6e 75 6d 65 72 69 | * prefi|x-numeri|
|00001310| 63 2d 76 61 6c 75 65 20 | 2f 20 31 30 20 66 6f 72 |c-value |/ 10 for|
|00001320| 77 61 72 64 2d 6c 69 6e | 65 20 31 5d 20 31 33 29 |ward-lin|e 1] 13)|
|00001330| 29 0a 0a 28 64 65 66 75 | 6e 20 65 6e 64 2d 6f 66 |)..(defu|n end-of|
|00001340| 2d 62 75 66 66 65 72 20 | 28 26 6f 70 74 69 6f 6e |-buffer |(&option|
|00001350| 61 6c 20 61 72 67 29 20 | 22 5c 0a 4d 6f 76 65 20 |al arg) |"\.Move |
|00001360| 70 6f 69 6e 74 20 74 6f | 20 74 68 65 20 65 6e 64 |point to| the end|
|00001370| 20 6f 66 20 74 68 65 20 | 62 75 66 66 65 72 3b 20 | of the |buffer; |
|00001380| 6c 65 61 76 65 20 6d 61 | 72 6b 20 61 74 20 70 72 |leave ma|rk at pr|
|00001390| 65 76 69 6f 75 73 20 70 | 6f 73 69 74 69 6f 6e 2e |evious p|osition.|
|000013a0| 0a 57 69 74 68 20 61 72 | 67 20 4e 2c 20 70 75 74 |.With ar|g N, put|
|000013b0| 20 70 6f 69 6e 74 20 4e | 2f 31 30 20 6f 66 20 74 | point N|/10 of t|
|000013c0| 68 65 20 77 61 79 20 66 | 72 6f 6d 20 74 68 65 20 |he way f|rom the |
|000013d0| 74 72 75 65 20 65 6e 64 | 2e 0a 44 6f 6e 27 74 20 |true end|..Don't |
|000013e0| 75 73 65 20 74 68 69 73 | 20 69 6e 20 4c 69 73 70 |use this| in Lisp|
|000013f0| 20 70 72 6f 67 72 61 6d | 73 21 0a 28 67 6f 74 6f | program|s!.(goto|
|00001400| 2d 63 68 61 72 20 28 70 | 6f 69 6e 74 2d 6d 61 78 |-char (p|oint-max|
|00001410| 29 29 20 69 73 20 66 61 | 73 74 65 72 20 61 6e 64 |)) is fa|ster and|
|00001420| 20 64 6f 65 73 20 6e 6f | 74 20 73 65 74 20 74 68 | does no|t set th|
|00001430| 65 20 6d 61 72 6b 2e 22 | 20 28 69 6e 74 65 72 61 |e mark."| (intera|
|00001440| 63 74 69 76 65 20 22 50 | 22 29 20 28 62 79 74 65 |ctive "P|") (byte|
|00001450| 2d 63 6f 64 65 20 22 c1 | 88 c2 20 88 08 83 2e 00 |-code ".|.. .....|
|00001460| c3 20 54 c3 20 c4 56 83 | 20 00 c5 c6 08 21 c7 c3 |. T. .V.| ....!..|
|00001470| 20 c8 5c 22 5c 22 82 2a | 00 c7 c5 c3 20 c6 08 21 | .\"\".*|.... ..!|
|00001480| 5c 22 c8 5c 22 5a 82 2f | 00 64 62 88 08 85 38 00 |\".\"Z./|.db...8.|
|00001490| c9 ca 21 87 22 20 5b 61 | 72 67 20 6e 69 6c 20 70 |..!." [a|rg nil p|
|000014a0| 75 73 68 2d 6d 61 72 6b | 20 62 75 66 66 65 72 2d |ush-mark| buffer-|
|000014b0| 73 69 7a 65 20 31 30 30 | 30 30 20 2a 20 70 72 65 |size 100|00 * pre|
|000014c0| 66 69 78 2d 6e 75 6d 65 | 72 69 63 2d 76 61 6c 75 |fix-nume|ric-valu|
|000014d0| 65 20 2f 20 31 30 20 66 | 6f 72 77 61 72 64 2d 6c |e / 10 f|orward-l|
|000014e0| 69 6e 65 20 31 5d 20 31 | 34 29 29 0a 0a 28 64 65 |ine 1] 1|4))..(de|
|000014f0| 66 75 6e 20 6d 61 72 6b | 2d 77 68 6f 6c 65 2d 62 |fun mark|-whole-b|
|00001500| 75 66 66 65 72 20 6e 69 | 6c 20 22 5c 0a 50 75 74 |uffer ni|l "\.Put|
|00001510| 20 70 6f 69 6e 74 20 61 | 74 20 62 65 67 69 6e 6e | point a|t beginn|
|00001520| 69 6e 67 20 61 6e 64 20 | 6d 61 72 6b 20 61 74 20 |ing and |mark at |
|00001530| 65 6e 64 20 6f 66 20 62 | 75 66 66 65 72 2e 22 20 |end of b|uffer." |
|00001540| 28 69 6e 74 65 72 61 63 | 74 69 76 65 29 20 28 62 |(interac|tive) (b|
|00001550| 79 74 65 2d 63 6f 64 65 | 20 22 c0 88 c1 60 21 88 |yte-code| "...`!.|
|00001560| c1 64 21 88 65 62 87 22 | 20 5b 6e 69 6c 20 70 75 |.d!.eb."| [nil pu|
|00001570| 73 68 2d 6d 61 72 6b 5d | 20 33 29 29 0a 0a 28 64 |sh-mark]| 3))..(d|
|00001580| 65 66 75 6e 20 63 6f 75 | 6e 74 2d 6c 69 6e 65 73 |efun cou|nt-lines|
|00001590| 2d 72 65 67 69 6f 6e 20 | 28 73 74 61 72 74 20 65 |-region |(start e|
|000015a0| 6e 64 29 20 22 5c 0a 50 | 72 69 6e 74 20 6e 75 6d |nd) "\.P|rint num|
|000015b0| 62 65 72 20 6f 66 20 6c | 69 6e 65 73 20 69 6e 20 |ber of l|ines in |
|000015c0| 74 68 65 20 72 65 67 69 | 6f 6e 2e 22 20 28 69 6e |the regi|on." (in|
|000015d0| 74 65 72 61 63 74 69 76 | 65 20 22 72 22 29 20 28 |teractiv|e "r") (|
|000015e0| 62 79 74 65 2d 63 6f 64 | 65 20 22 c2 88 c3 c4 c5 |byte-cod|e ".....|
|000015f0| 08 09 5c 22 5c 22 87 22 | 20 5b 73 74 61 72 74 20 |..\"\"."| [start |
|00001600| 65 6e 64 20 6e 69 6c 20 | 6d 65 73 73 61 67 65 20 |end nil |message |
|00001610| 22 52 65 67 69 6f 6e 20 | 68 61 73 20 25 64 20 6c |"Region |has %d l|
|00001620| 69 6e 65 73 22 20 63 6f | 75 6e 74 2d 6c 69 6e 65 |ines" co|unt-line|
|00001630| 73 5d 20 35 29 29 0a 0a | 28 64 65 66 75 6e 20 77 |s] 5))..|(defun w|
|00001640| 68 61 74 2d 6c 69 6e 65 | 20 6e 69 6c 20 22 5c 0a |hat-line| nil "\.|
|00001650| 50 72 69 6e 74 20 74 68 | 65 20 63 75 72 72 65 6e |Print th|e curren|
|00001660| 74 20 6c 69 6e 65 20 6e | 75 6d 62 65 72 20 28 69 |t line n|umber (i|
|00001670| 6e 20 74 68 65 20 62 75 | 66 66 65 72 29 20 6f 66 |n the bu|ffer) of|
|00001680| 20 70 6f 69 6e 74 2e 22 | 20 28 69 6e 74 65 72 61 | point."| (intera|
|00001690| 63 74 69 76 65 29 20 28 | 62 79 74 65 2d 63 6f 64 |ctive) (|byte-cod|
|000016a0| 65 20 22 c0 88 8c c1 20 | 88 8a c2 20 88 c3 c4 c5 |e ".... |... ....|
|000016b0| c6 60 5c 22 54 5c 22 29 | 29 87 22 20 5b 6e 69 6c |.`\"T\")|)." [nil|
|000016c0| 20 77 69 64 65 6e 20 62 | 65 67 69 6e 6e 69 6e 67 | widen b|eginning|
|000016d0| 2d 6f 66 2d 6c 69 6e 65 | 20 6d 65 73 73 61 67 65 |-of-line| message|
|000016e0| 20 22 4c 69 6e 65 20 25 | 64 22 20 63 6f 75 6e 74 | "Line %|d" count|
|000016f0| 2d 6c 69 6e 65 73 20 31 | 5d 20 37 29 29 0a 0a 28 |-lines 1|] 7))..(|
|00001700| 64 65 66 75 6e 20 63 6f | 75 6e 74 2d 6c 69 6e 65 |defun co|unt-line|
|00001710| 73 20 28 73 74 61 72 74 | 20 65 6e 64 29 20 22 5c |s (start| end) "\|
|00001720| 0a 52 65 74 75 72 6e 20 | 6e 75 6d 62 65 72 20 6f |.Return |number o|
|00001730| 66 20 6e 65 77 6c 69 6e | 65 73 20 62 65 74 77 65 |f newlin|es betwe|
|00001740| 65 6e 20 53 54 41 52 54 | 20 61 6e 64 20 45 4e 44 |en START| and END|
|00001750| 2e 22 20 28 62 79 74 65 | 2d 63 6f 64 65 20 22 8a |." (byte|-code ".|
|00001760| 8c c2 08 09 5c 22 88 65 | 62 88 c3 20 c4 c3 20 21 |....\".e|b.. .. !|
|00001770| 5a 29 29 87 22 20 5b 73 | 74 61 72 74 20 65 6e 64 |Z))." [s|tart end|
|00001780| 20 6e 61 72 72 6f 77 2d | 74 6f 2d 72 65 67 69 6f | narrow-|to-regio|
|00001790| 6e 20 62 75 66 66 65 72 | 2d 73 69 7a 65 20 66 6f |n buffer|-size fo|
|000017a0| 72 77 61 72 64 2d 6c 69 | 6e 65 5d 20 36 29 29 0a |rward-li|ne] 6)).|
|000017b0| 0a 28 64 65 66 75 6e 20 | 77 68 61 74 2d 63 75 72 |.(defun |what-cur|
|000017c0| 73 6f 72 2d 70 6f 73 69 | 74 69 6f 6e 20 6e 69 6c |sor-posi|tion nil|
|000017d0| 20 22 5c 0a 50 72 69 6e | 74 20 69 6e 66 6f 20 6f | "\.Prin|t info o|
|000017e0| 6e 20 63 75 72 73 6f 72 | 20 70 6f 73 69 74 69 6f |n cursor| positio|
|000017f0| 6e 20 28 6f 6e 20 73 63 | 72 65 65 6e 20 61 6e 64 |n (on sc|reen and|
|00001800| 20 77 69 74 68 69 6e 20 | 62 75 66 66 65 72 29 2e | within |buffer).|
|00001810| 22 20 28 69 6e 74 65 72 | 61 63 74 69 76 65 29 20 |" (inter|active) |
|00001820| 28 62 79 74 65 2d 63 6f | 64 65 20 22 c8 88 67 18 |(byte-co|de "..g.|
|00001830| 65 19 64 1a 60 1b c9 20 | 1c 0c ca 56 83 25 00 cb |e.d.`.. |...V.%..|
|00001840| cb 0c cc 5c 22 0b 53 5c | 5c cb 0c cd 5c 22 ce 5d |...\".S\|\...\".]|
|00001850| 5c 22 82 34 00 cb cb 0c | cf 5c 22 d0 cd 0b 53 5c |\".4....|.\"...S\|
|00001860| 22 5c 5c 0c ce 5d 5c 22 | 1d d1 20 d2 55 83 40 00 |"\\..]\"|.. .U.@.|
|00001870| d3 82 45 00 d4 d5 d1 20 | 5c 22 1e 06 69 1e 07 0b |..E.... |\"..i...|
|00001880| 0a 55 83 7d 00 d6 09 ce | 5c 22 86 5c 5c 00 d6 0a |.U.}....|\".\\...|
|00001890| 0c 54 5c 22 83 6f 00 d7 | d8 0b 0c 0d 09 0a 0e 07 |.T\".o..|........|
|000018a0| 0e 06 26 08 82 7a 00 d7 | d9 0b 0c 0d 0e 07 0e 06 |..&..z..|........|
|000018b0| 26 06 82 af 00 d6 09 ce | 5c 22 86 89 00 d6 0a 0c |&.......|\"......|
|000018c0| 54 5c 22 83 a0 00 d7 da | db 08 21 08 0b 0c 0d 09 |T\".....|..!.....|
|000018d0| 0a 0e 07 0e 06 26 0a 82 | af 00 d7 dc db 08 21 08 |.....&..|......!.|
|000018e0| 0b 0c 0d 0e 07 0e 06 26 | 08 2e 08 87 22 20 5b 63 |.......&|...." [c|
|000018f0| 68 61 72 20 62 65 67 20 | 65 6e 64 20 70 6f 73 20 |har beg |end pos |
|00001900| 74 6f 74 61 6c 20 70 65 | 72 63 65 6e 74 20 68 73 |total pe|rcent hs|
|00001910| 63 72 6f 6c 6c 20 63 6f | 6c 20 6e 69 6c 20 62 75 |croll co|l nil bu|
|00001920| 66 66 65 72 2d 73 69 7a | 65 20 35 30 30 30 30 20 |ffer-siz|e 50000 |
|00001930| 2f 20 32 30 30 20 31 30 | 30 20 31 20 32 20 2a 20 |/ 200 10|0 1 2 * |
|00001940| 77 69 6e 64 6f 77 2d 68 | 73 63 72 6f 6c 6c 20 30 |window-h|scroll 0|
|00001950| 20 22 22 20 66 6f 72 6d | 61 74 20 22 20 48 73 63 | "" form|at " Hsc|
|00001960| 72 6f 6c 6c 3d 25 64 22 | 20 2f 3d 20 6d 65 73 73 |roll=%d"| /= mess|
|00001970| 61 67 65 20 22 70 6f 69 | 6e 74 3d 25 64 20 6f 66 |age "poi|nt=%d of|
|00001980| 20 25 64 28 25 64 25 25 | 29 20 3c 25 64 20 2d 20 | %d(%d%%|) <%d - |
|00001990| 25 64 3e 20 20 63 6f 6c | 75 6d 6e 20 25 64 20 25 |%d> col|umn %d %|
|000019a0| 73 22 20 22 70 6f 69 6e | 74 3d 25 64 20 6f 66 20 |s" "poin|t=%d of |
|000019b0| 25 64 28 25 64 25 25 29 | 20 20 63 6f 6c 75 6d 6e |%d(%d%%)| column|
|000019c0| 20 25 64 20 25 73 22 20 | 22 43 68 61 72 3a 20 25 | %d %s" |"Char: %|
|000019d0| 73 20 28 30 25 6f 29 20 | 20 70 6f 69 6e 74 3d 25 |s (0%o) | point=%|
|000019e0| 64 20 6f 66 20 25 64 28 | 25 64 25 25 29 20 3c 25 |d of %d(|%d%%) <%|
|000019f0| 64 20 2d 20 25 64 3e 20 | 20 63 6f 6c 75 6d 6e 20 |d - %d> | column |
|00001a00| 25 64 20 25 73 22 20 73 | 69 6e 67 6c 65 2d 6b 65 |%d %s" s|ingle-ke|
|00001a10| 79 2d 64 65 73 63 72 69 | 70 74 69 6f 6e 20 22 43 |y-descri|ption "C|
|00001a20| 68 61 72 3a 20 25 73 20 | 28 30 25 6f 29 20 20 70 |har: %s |(0%o) p|
|00001a30| 6f 69 6e 74 3d 25 64 20 | 6f 66 20 25 64 28 25 64 |oint=%d |of %d(%d|
|00001a40| 25 25 29 20 20 63 6f 6c | 75 6d 6e 20 25 64 20 25 |%%) col|umn %d %|
|00001a50| 73 22 5d 20 32 38 29 29 | 0a 0a 28 64 65 66 75 6e |s"] 28))|..(defun|
|00001a60| 20 66 75 6e 64 61 6d 65 | 6e 74 61 6c 2d 6d 6f 64 | fundame|ntal-mod|
|00001a70| 65 20 6e 69 6c 20 22 5c | 0a 4d 61 6a 6f 72 20 6d |e nil "\|.Major m|
|00001a80| 6f 64 65 20 6e 6f 74 20 | 73 70 65 63 69 61 6c 69 |ode not |speciali|
|00001a90| 7a 65 64 20 66 6f 72 20 | 61 6e 79 74 68 69 6e 67 |zed for |anything|
|00001aa0| 20 69 6e 20 70 61 72 74 | 69 63 75 6c 61 72 2e 0a | in part|icular..|
|00001ab0| 4f 74 68 65 72 20 6d 61 | 6a 6f 72 20 6d 6f 64 65 |Other ma|jor mode|
|00001ac0| 73 20 61 72 65 20 64 65 | 66 69 6e 65 64 20 62 79 |s are de|fined by|
|00001ad0| 20 63 6f 6d 70 61 72 69 | 73 6f 6e 20 77 69 74 68 | compari|son with|
|00001ae0| 20 74 68 69 73 20 6f 6e | 65 2e 22 20 28 69 6e 74 | this on|e." (int|
|00001af0| 65 72 61 63 74 69 76 65 | 29 20 28 62 79 74 65 2d |eractive|) (byte-|
|00001b00| 63 6f 64 65 20 22 c0 88 | c1 20 87 22 20 5b 6e 69 |code "..|. ." [ni|
|00001b10| 6c 20 6b 69 6c 6c 2d 61 | 6c 6c 2d 6c 6f 63 61 6c |l kill-a|ll-local|
|00001b20| 2d 76 61 72 69 61 62 6c | 65 73 5d 20 32 29 29 0a |-variabl|es] 2)).|
|00001b30| 0a 28 70 75 74 20 28 71 | 75 6f 74 65 20 65 76 61 |.(put (q|uote eva|
|00001b40| 6c 2d 65 78 70 72 65 73 | 73 69 6f 6e 29 20 28 71 |l-expres|sion) (q|
|00001b50| 75 6f 74 65 20 64 69 73 | 61 62 6c 65 64 29 20 74 |uote dis|abled) t|
|00001b60| 29 0a 0a 28 64 65 66 75 | 6e 20 65 76 61 6c 2d 65 |)..(defu|n eval-e|
|00001b70| 78 70 72 65 73 73 69 6f | 6e 20 28 65 78 70 72 65 |xpressio|n (expre|
|00001b80| 73 73 69 6f 6e 29 20 22 | 5c 0a 45 76 61 6c 75 61 |ssion) "|\.Evalua|
|00001b90| 74 65 20 45 58 50 52 45 | 53 53 49 4f 4e 20 61 6e |te EXPRE|SSION an|
|00001ba0| 64 20 70 72 69 6e 74 20 | 76 61 6c 75 65 20 69 6e |d print |value in|
|00001bb0| 20 6d 69 6e 69 62 75 66 | 66 65 72 2e 0a 56 61 6c | minibuf|fer..Val|
|00001bc0| 75 65 20 69 73 20 61 6c | 73 6f 20 63 6f 6e 73 65 |ue is al|so conse|
|00001bd0| 64 20 6f 6e 20 74 6f 20 | 66 72 6f 6e 74 20 6f 66 |d on to |front of|
|00001be0| 20 76 61 72 69 61 62 6c | 65 20 20 76 61 6c 75 65 | variabl|e value|
|00001bf0| 73 20 20 27 73 20 76 61 | 6c 75 65 2e 22 20 28 69 |s 's va|lue." (i|
|00001c00| 6e 74 65 72 61 63 74 69 | 76 65 20 22 78 45 76 61 |nteracti|ve "xEva|
|00001c10| 6c 3a 20 22 29 20 28 62 | 79 74 65 2d 63 6f 64 65 |l: ") (b|yte-code|
|00001c20| 20 22 c3 88 c4 09 21 08 | 42 89 10 88 c5 08 40 c2 | "....!.|B.....@.|
|00001c30| 5c 22 87 22 20 5b 76 61 | 6c 75 65 73 20 65 78 70 |\"." [va|lues exp|
|00001c40| 72 65 73 73 69 6f 6e 20 | 74 20 6e 69 6c 20 65 76 |ression |t nil ev|
|00001c50| 61 6c 20 70 72 69 6e 31 | 5d 20 34 29 29 0a 0a 28 |al prin1|] 4))..(|
|00001c60| 64 65 66 75 6e 20 65 64 | 69 74 2d 61 6e 64 2d 65 |defun ed|it-and-e|
|00001c70| 76 61 6c 2d 63 6f 6d 6d | 61 6e 64 20 28 70 72 6f |val-comm|and (pro|
|00001c80| 6d 70 74 20 63 6f 6d 6d | 61 6e 64 29 20 22 5c 0a |mpt comm|and) "\.|
|00001c90| 50 72 6f 6d 70 74 69 6e | 67 20 77 69 74 68 20 50 |Promptin|g with P|
|00001ca0| 52 4f 4d 50 54 2c 20 6c | 65 74 20 75 73 65 72 20 |ROMPT, l|et user |
|00001cb0| 65 64 69 74 20 43 4f 4d | 4d 41 4e 44 20 61 6e 64 |edit COM|MAND and|
|00001cc0| 20 65 76 61 6c 20 72 65 | 73 75 6c 74 2e 0a 43 4f | eval re|sult..CO|
|00001cd0| 4d 4d 41 4e 44 20 69 73 | 20 61 20 4c 69 73 70 20 |MMAND is| a Lisp |
|00001ce0| 65 78 70 72 65 73 73 69 | 6f 6e 2e 20 20 4c 65 74 |expressi|on. Let|
|00001cf0| 20 75 73 65 72 20 65 64 | 69 74 20 74 68 61 74 20 | user ed|it that |
|00001d00| 65 78 70 72 65 73 73 69 | 6f 6e 20 69 6e 0a 74 68 |expressi|on in.th|
|00001d10| 65 20 6d 69 6e 69 62 75 | 66 66 65 72 2c 20 74 68 |e minibu|ffer, th|
|00001d20| 65 6e 20 72 65 61 64 20 | 61 6e 64 20 65 76 61 6c |en read |and eval|
|00001d30| 75 61 74 65 20 74 68 65 | 20 72 65 73 75 6c 74 2e |uate the| result.|
|00001d40| 22 20 28 62 79 74 65 2d | 63 6f 64 65 20 22 c2 c3 |" (byte-|code "..|
|00001d50| 08 c4 09 21 5c 22 21 87 | 22 20 5b 70 72 6f 6d 70 |...!\"!.|" [promp|
|00001d60| 74 20 63 6f 6d 6d 61 6e | 64 20 65 76 61 6c 20 72 |t comman|d eval r|
|00001d70| 65 61 64 2d 6d 69 6e 69 | 62 75 66 66 65 72 20 70 |ead-mini|buffer p|
|00001d80| 72 69 6e 31 2d 74 6f 2d | 73 74 72 69 6e 67 5d 20 |rin1-to-|string] |
|00001d90| 35 29 29 0a 0a 28 64 65 | 66 76 61 72 20 72 65 70 |5))..(de|fvar rep|
|00001da0| 65 61 74 2d 63 6f 6d 70 | 6c 65 78 2d 63 6f 6d 6d |eat-comp|lex-comm|
|00001db0| 61 6e 64 2d 6d 61 70 20 | 28 63 6f 70 79 2d 61 6c |and-map |(copy-al|
|00001dc0| 69 73 74 20 6d 69 6e 69 | 62 75 66 66 65 72 2d 6c |ist mini|buffer-l|
|00001dd0| 6f 63 61 6c 2d 6d 61 70 | 29 29 0a 0a 28 64 65 66 |ocal-map|))..(def|
|00001de0| 69 6e 65 2d 6b 65 79 20 | 72 65 70 65 61 74 2d 63 |ine-key |repeat-c|
|00001df0| 6f 6d 70 6c 65 78 2d 63 | 6f 6d 6d 61 6e 64 2d 6d |omplex-c|ommand-m|
|00001e00| 61 70 20 22 1b 70 22 20 | 28 71 75 6f 74 65 20 70 |ap ".p" |(quote p|
|00001e10| 72 65 76 69 6f 75 73 2d | 63 6f 6d 70 6c 65 78 2d |revious-|complex-|
|00001e20| 63 6f 6d 6d 61 6e 64 29 | 29 0a 0a 28 64 65 66 69 |command)|)..(defi|
|00001e30| 6e 65 2d 6b 65 79 20 72 | 65 70 65 61 74 2d 63 6f |ne-key r|epeat-co|
|00001e40| 6d 70 6c 65 78 2d 63 6f | 6d 6d 61 6e 64 2d 6d 61 |mplex-co|mmand-ma|
|00001e50| 70 20 22 1b 6e 22 20 28 | 71 75 6f 74 65 20 6e 65 |p ".n" (|quote ne|
|00001e60| 78 74 2d 63 6f 6d 70 6c | 65 78 2d 63 6f 6d 6d 61 |xt-compl|ex-comma|
|00001e70| 6e 64 29 29 0a 0a 28 64 | 65 66 75 6e 20 72 65 70 |nd))..(d|efun rep|
|00001e80| 65 61 74 2d 63 6f 6d 70 | 6c 65 78 2d 63 6f 6d 6d |eat-comp|lex-comm|
|00001e90| 61 6e 64 20 28 72 65 70 | 65 61 74 2d 63 6f 6d 70 |and (rep|eat-comp|
|00001ea0| 6c 65 78 2d 63 6f 6d 6d | 61 6e 64 2d 61 72 67 29 |lex-comm|and-arg)|
|00001eb0| 20 22 5c 0a 45 64 69 74 | 20 61 6e 64 20 72 65 2d | "\.Edit| and re-|
|00001ec0| 65 76 61 6c 75 61 74 65 | 20 6c 61 73 74 20 63 6f |evaluate| last co|
|00001ed0| 6d 70 6c 65 78 20 63 6f | 6d 6d 61 6e 64 2c 20 6f |mplex co|mmand, o|
|00001ee0| 72 20 41 52 47 74 68 20 | 66 72 6f 6d 20 6c 61 73 |r ARGth |from las|
|00001ef0| 74 2e 0a 41 20 63 6f 6d | 70 6c 65 78 20 63 6f 6d |t..A com|plex com|
|00001f00| 6d 61 6e 64 20 69 73 20 | 6f 6e 65 20 77 68 69 63 |mand is |one whic|
|00001f10| 68 20 75 73 65 64 20 74 | 68 65 20 6d 69 6e 69 62 |h used t|he minib|
|00001f20| 75 66 66 65 72 2e 0a 54 | 68 65 20 63 6f 6d 6d 61 |uffer..T|he comma|
|00001f30| 6e 64 20 69 73 20 70 6c | 61 63 65 64 20 69 6e 20 |nd is pl|aced in |
|00001f40| 74 68 65 20 6d 69 6e 69 | 62 75 66 66 65 72 20 61 |the mini|buffer a|
|00001f50| 73 20 61 20 4c 69 73 70 | 20 66 6f 72 6d 20 66 6f |s a Lisp| form fo|
|00001f60| 72 20 65 64 69 74 69 6e | 67 2e 0a 54 68 65 20 72 |r editin|g..The r|
|00001f70| 65 73 75 6c 74 20 69 73 | 20 65 78 65 63 75 74 65 |esult is| execute|
|00001f80| 64 2c 20 72 65 70 65 61 | 74 69 6e 67 20 74 68 65 |d, repea|ting the|
|00001f90| 20 63 6f 6d 6d 61 6e 64 | 20 61 73 20 63 68 61 6e | command| as chan|
|00001fa0| 67 65 64 2e 0a 49 66 20 | 74 68 65 20 63 6f 6d 6d |ged..If |the comm|
|00001fb0| 61 6e 64 20 68 61 73 20 | 62 65 65 6e 20 63 68 61 |and has |been cha|
|00001fc0| 6e 67 65 64 20 6f 72 20 | 69 73 20 6e 6f 74 20 74 |nged or |is not t|
|00001fd0| 68 65 20 6d 6f 73 74 20 | 72 65 63 65 6e 74 20 70 |he most |recent p|
|00001fe0| 72 65 76 69 6f 75 73 20 | 63 6f 6d 6d 61 6e 64 0a |revious |command.|
|00001ff0| 69 74 20 69 73 20 61 64 | 64 65 64 20 74 6f 20 74 |it is ad|ded to t|
|00002000| 68 65 20 66 72 6f 6e 74 | 20 6f 66 20 74 68 65 20 |he front| of the |
|00002010| 63 6f 6d 6d 61 6e 64 20 | 68 69 73 74 6f 72 79 2e |command |history.|
|00002020| 0a 57 68 69 6c 73 74 20 | 65 64 69 74 69 6e 67 20 |.Whilst |editing |
|00002030| 74 68 65 20 63 6f 6d 6d | 61 6e 64 2c 20 74 68 65 |the comm|and, the|
|00002040| 20 66 6f 6c 6c 6f 77 69 | 6e 67 20 63 6f 6d 6d 61 | followi|ng comma|
|00002050| 6e 64 73 20 61 72 65 20 | 61 76 61 69 6c 61 62 6c |nds are |availabl|
|00002060| 65 3a 0a 5c 5c 7b 72 65 | 70 65 61 74 2d 63 6f 6d |e:.\\{re|peat-com|
|00002070| 70 6c 65 78 2d 63 6f 6d | 6d 61 6e 64 2d 6d 61 70 |plex-com|mand-map|
|00002080| 7d 22 20 28 69 6e 74 65 | 72 61 63 74 69 76 65 20 |}" (inte|ractive |
|00002090| 22 70 22 29 20 28 62 79 | 74 65 2d 63 6f 64 65 20 |"p") (by|te-code |
|000020a0| 22 c6 88 09 53 0a 38 c6 | 1b 18 08 83 2c 00 c7 c8 |"...S.8.|....,...|
|000020b0| c9 08 21 0c c5 24 89 13 | 88 ca 0b 0a 40 5c 22 86 |..!..$..|....@\".|
|000020c0| 25 00 0b 0a 42 89 12 88 | cb 0b 21 82 2e 00 cc 20 |%...B...|..!.... |
|000020d0| 2a 87 22 20 5b 65 6c 74 | 20 72 65 70 65 61 74 2d |*." [elt| repeat-|
|000020e0| 63 6f 6d 70 6c 65 78 2d | 63 6f 6d 6d 61 6e 64 2d |complex-|command-|
|000020f0| 61 72 67 20 63 6f 6d 6d | 61 6e 64 2d 68 69 73 74 |arg comm|and-hist|
|00002100| 6f 72 79 20 6e 65 77 63 | 6d 64 20 72 65 70 65 61 |ory newc|md repea|
|00002110| 74 2d 63 6f 6d 70 6c 65 | 78 2d 63 6f 6d 6d 61 6e |t-comple|x-comman|
|00002120| 64 2d 6d 61 70 20 74 20 | 6e 69 6c 20 72 65 61 64 |d-map t |nil read|
|00002130| 2d 66 72 6f 6d 2d 6d 69 | 6e 69 62 75 66 66 65 72 |-from-mi|nibuffer|
|00002140| 20 22 52 65 64 6f 3a 20 | 22 20 70 72 69 6e 31 2d | "Redo: |" prin1-|
|00002150| 74 6f 2d 73 74 72 69 6e | 67 20 65 71 75 61 6c 20 |to-strin|g equal |
|00002160| 65 76 61 6c 20 64 69 6e | 67 5d 20 36 29 29 0a 0a |eval din|g] 6))..|
|00002170| 28 64 65 66 75 6e 20 6e | 65 78 74 2d 63 6f 6d 70 |(defun n|ext-comp|
|00002180| 6c 65 78 2d 63 6f 6d 6d | 61 6e 64 20 28 6e 29 20 |lex-comm|and (n) |
|00002190| 22 5c 0a 49 6e 73 65 72 | 74 73 20 74 68 65 20 6e |"\.Inser|ts the n|
|000021a0| 65 78 74 20 65 6c 65 6d | 65 6e 74 20 6f 66 20 60 |ext elem|ent of `|
|000021b0| 63 6f 6d 6d 61 6e 64 2d | 68 69 73 74 6f 72 79 27 |command-|history'|
|000021c0| 20 69 6e 74 6f 20 74 68 | 65 20 6d 69 6e 69 62 75 | into th|e minibu|
|000021d0| 66 66 65 72 2e 22 20 28 | 69 6e 74 65 72 61 63 74 |ffer." (|interact|
|000021e0| 69 76 65 20 22 70 22 29 | 20 28 62 79 74 65 2d 63 |ive "p")| (byte-c|
|000021f0| 6f 64 65 20 22 c4 88 c5 | 09 0a 5a 5d 0b 47 5e 18 |ode "...|..Z].G^.|
|00002200| 09 08 55 83 21 00 c6 09 | c5 55 83 1c 00 c7 82 1d |..U.!...|.U......|
|00002210| 00 c8 21 82 32 00 c9 20 | 88 08 89 11 88 ca 09 53 |..!.2.. |.......S|
|00002220| 0b 38 21 63 88 65 62 29 | 87 22 20 5b 6e 61 72 67 |.8!c.eb)|." [narg|
|00002230| 20 72 65 70 65 61 74 2d | 63 6f 6d 70 6c 65 78 2d | repeat-|complex-|
|00002240| 63 6f 6d 6d 61 6e 64 2d | 61 72 67 20 6e 20 63 6f |command-|arg n co|
|00002250| 6d 6d 61 6e 64 2d 68 69 | 73 74 6f 72 79 20 6e 69 |mmand-hi|story ni|
|00002260| 6c 20 31 20 65 72 72 6f | 72 20 22 4e 6f 20 66 6f |l 1 erro|r "No fo|
|00002270| 6c 6c 6f 77 69 6e 67 20 | 69 74 65 6d 20 69 6e 20 |llowing |item in |
|00002280| 63 6f 6d 6d 61 6e 64 20 | 68 69 73 74 6f 72 79 22 |command |history"|
|00002290| 20 22 4e 6f 20 70 72 65 | 63 65 65 64 69 6e 67 20 | "No pre|ceeding |
|000022a0| 69 74 65 6d 20 63 6f 6d | 6d 61 6e 64 20 68 69 73 |item com|mand his|
|000022b0| 74 6f 72 79 22 20 65 72 | 61 73 65 2d 62 75 66 66 |tory" er|ase-buff|
|000022c0| 65 72 20 70 72 69 6e 31 | 2d 74 6f 2d 73 74 72 69 |er prin1|-to-stri|
|000022d0| 6e 67 5d 20 35 29 29 0a | 0a 28 64 65 66 75 6e 20 |ng] 5)).|.(defun |
|000022e0| 70 72 65 76 69 6f 75 73 | 2d 63 6f 6d 70 6c 65 78 |previous|-complex|
|000022f0| 2d 63 6f 6d 6d 61 6e 64 | 20 28 6e 29 20 22 5c 0a |-command| (n) "\.|
|00002300| 49 6e 73 65 72 74 73 20 | 74 68 65 20 70 72 65 76 |Inserts |the prev|
|00002310| 69 6f 75 73 20 65 6c 65 | 6d 65 6e 74 20 6f 66 20 |ious ele|ment of |
|00002320| 60 63 6f 6d 6d 61 6e 64 | 2d 68 69 73 74 6f 72 79 |`command|-history|
|00002330| 27 20 69 6e 74 6f 20 74 | 68 65 20 6d 69 6e 69 62 |' into t|he minib|
|00002340| 75 66 66 65 72 2e 22 20 | 28 69 6e 74 65 72 61 63 |uffer." |(interac|
|00002350| 74 69 76 65 20 22 70 22 | 29 20 28 62 79 74 65 2d |tive "p"|) (byte-|
|00002360| 63 6f 64 65 20 22 c1 88 | c2 08 5b 21 87 22 20 5b |code "..|..[!." [|
|00002370| 6e 20 6e 69 6c 20 6e 65 | 78 74 2d 63 6f 6d 70 6c |n nil ne|xt-compl|
|00002380| 65 78 2d 63 6f 6d 6d 61 | 6e 64 5d 20 32 29 29 0a |ex-comma|nd] 2)).|
|00002390| 0a 28 64 65 66 75 6e 20 | 67 6f 74 6f 2d 6c 69 6e |.(defun |goto-lin|
|000023a0| 65 20 28 61 72 67 29 20 | 22 5c 0a 47 6f 74 6f 20 |e (arg) |"\.Goto |
|000023b0| 6c 69 6e 65 20 41 52 47 | 2c 20 63 6f 75 6e 74 69 |line ARG|, counti|
|000023c0| 6e 67 20 66 72 6f 6d 20 | 6c 69 6e 65 20 31 20 61 |ng from |line 1 a|
|000023d0| 74 20 62 65 67 69 6e 6e | 69 6e 67 20 6f 66 20 62 |t beginn|ing of b|
|000023e0| 75 66 66 65 72 2e 22 20 | 28 69 6e 74 65 72 61 63 |uffer." |(interac|
|000023f0| 74 69 76 65 20 22 4e 47 | 6f 74 6f 20 6c 69 6e 65 |tive "NG|oto line|
|00002400| 3a 20 22 29 20 28 62 79 | 74 65 2d 63 6f 64 65 20 |: ") (by|te-code |
|00002410| 22 c2 88 8c c4 20 88 c5 | 62 88 08 c1 3d 83 19 00 |".... ..|b...=...|
|00002420| c6 c7 c2 c8 0b 53 24 82 | 1d 00 c9 0b 53 21 29 87 |.....S$.|....S!).|
|00002430| 22 20 5b 73 65 6c 65 63 | 74 69 76 65 2d 64 69 73 |" [selec|tive-dis|
|00002440| 70 6c 61 79 20 74 20 6e | 69 6c 20 61 72 67 20 77 |play t n|il arg w|
|00002450| 69 64 65 6e 20 31 20 72 | 65 2d 73 65 61 72 63 68 |iden 1 r|e-search|
|00002460| 2d 66 6f 72 77 61 72 64 | 20 22 5b 0a 0d 5d 22 20 |-forward| "[..]" |
|00002470| 65 6e 64 20 66 6f 72 77 | 61 72 64 2d 6c 69 6e 65 |end forw|ard-line|
|00002480| 5d 20 36 29 29 0a 0a 28 | 66 73 65 74 20 28 71 75 |] 6))..(|fset (qu|
|00002490| 6f 74 65 20 61 64 76 65 | 72 74 69 73 65 64 2d 75 |ote adve|rtised-u|
|000024a0| 6e 64 6f 29 20 28 71 75 | 6f 74 65 20 75 6e 64 6f |ndo) (qu|ote undo|
|000024b0| 29 29 0a 0a 28 64 65 66 | 75 6e 20 75 6e 64 6f 20 |))..(def|un undo |
|000024c0| 28 26 6f 70 74 69 6f 6e | 61 6c 20 61 72 67 29 20 |(&option|al arg) |
|000024d0| 22 5c 0a 55 6e 64 6f 20 | 73 6f 6d 65 20 70 72 65 |"\.Undo |some pre|
|000024e0| 76 69 6f 75 73 20 63 68 | 61 6e 67 65 73 2e 0a 52 |vious ch|anges..R|
|000024f0| 65 70 65 61 74 20 74 68 | 69 73 20 63 6f 6d 6d 61 |epeat th|is comma|
|00002500| 6e 64 20 74 6f 20 75 6e | 64 6f 20 6d 6f 72 65 20 |nd to un|do more |
|00002510| 63 68 61 6e 67 65 73 2e | 0a 41 20 6e 75 6d 65 72 |changes.|.A numer|
|00002520| 69 63 20 61 72 67 75 6d | 65 6e 74 20 73 65 72 76 |ic argum|ent serv|
|00002530| 65 73 20 61 73 20 61 20 | 72 65 70 65 61 74 20 63 |es as a |repeat c|
|00002540| 6f 75 6e 74 2e 22 20 28 | 69 6e 74 65 72 61 63 74 |ount." (|interact|
|00002550| 69 76 65 20 22 2a 70 22 | 29 20 28 62 79 74 65 2d |ive "*p"|) (byte-|
|00002560| 63 6f 64 65 20 22 c4 88 | c5 20 18 c6 c7 21 88 09 |code "..|. ...!..|
|00002570| c8 3d 86 15 00 c9 20 88 | ca cb 21 88 c8 89 12 88 |.=.... .|..!.....|
|00002580| ca 0b 86 20 00 cb 21 88 | 08 85 2e 00 c5 20 3f 85 |... ..!.|..... ?.|
|00002590| 2e 00 cc 20 29 87 22 20 | 5b 6d 6f 64 69 66 69 65 |... )." |[modifie|
|000025a0| 64 20 6c 61 73 74 2d 63 | 6f 6d 6d 61 6e 64 20 74 |d last-c|ommand t|
|000025b0| 68 69 73 2d 63 6f 6d 6d | 61 6e 64 20 61 72 67 20 |his-comm|and arg |
|000025c0| 6e 69 6c 20 62 75 66 66 | 65 72 2d 6d 6f 64 69 66 |nil buff|er-modif|
|000025d0| 69 65 64 2d 70 20 6d 65 | 73 73 61 67 65 20 22 55 |ied-p me|ssage "U|
|000025e0| 6e 64 6f 21 22 20 75 6e | 64 6f 20 75 6e 64 6f 2d |ndo!" un|do undo-|
|000025f0| 73 74 61 72 74 20 75 6e | 64 6f 2d 6d 6f 72 65 20 |start un|do-more |
|00002600| 31 20 64 65 6c 65 74 65 | 2d 61 75 74 6f 2d 73 61 |1 delete|-auto-sa|
|00002610| 76 65 2d 66 69 6c 65 2d | 69 66 2d 6e 65 63 65 73 |ve-file-|if-neces|
|00002620| 73 61 72 79 5d 20 38 29 | 29 0a 0a 28 64 65 66 75 |sary] 8)|)..(defu|
|00002630| 6e 20 73 68 65 6c 6c 2d | 63 6f 6d 6d 61 6e 64 20 |n shell-|command |
|00002640| 28 63 6f 6d 6d 61 6e 64 | 20 26 6f 70 74 69 6f 6e |(command| &option|
|00002650| 61 6c 20 66 6c 61 67 29 | 20 22 5c 0a 45 78 65 63 |al flag)| "\.Exec|
|00002660| 75 74 65 20 73 74 72 69 | 6e 67 20 43 4f 4d 4d 41 |ute stri|ng COMMA|
|00002670| 4e 44 20 69 6e 20 69 6e | 66 65 72 69 6f 72 20 73 |ND in in|ferior s|
|00002680| 68 65 6c 6c 3b 20 64 69 | 73 70 6c 61 79 20 6f 75 |hell; di|splay ou|
|00002690| 74 70 75 74 2c 20 69 66 | 20 61 6e 79 2e 0a 4f 70 |tput, if| any..Op|
|000026a0| 74 69 6f 6e 61 6c 20 73 | 65 63 6f 6e 64 20 61 72 |tional s|econd ar|
|000026b0| 67 20 6e 6f 6e 2d 6e 69 | 6c 20 28 70 72 65 66 69 |g non-ni|l (prefi|
|000026c0| 78 20 61 72 67 2c 20 69 | 66 20 69 6e 74 65 72 61 |x arg, i|f intera|
|000026d0| 63 74 69 76 65 29 0a 6d | 65 61 6e 73 20 69 6e 73 |ctive).m|eans ins|
|000026e0| 65 72 74 20 6f 75 74 70 | 75 74 20 69 6e 20 63 75 |ert outp|ut in cu|
|000026f0| 72 72 65 6e 74 20 62 75 | 66 66 65 72 20 61 66 74 |rrent bu|ffer aft|
|00002700| 65 72 20 70 6f 69 6e 74 | 20 28 6c 65 61 76 65 20 |er point| (leave |
|00002710| 6d 61 72 6b 20 61 66 74 | 65 72 20 69 74 29 2e 22 |mark aft|er it)."|
|00002720| 20 28 69 6e 74 65 72 61 | 63 74 69 76 65 20 22 73 | (intera|ctive "s|
|00002730| 53 68 65 6c 6c 20 63 6f | 6d 6d 61 6e 64 3a 20 0a |Shell co|mmand: .|
|00002740| 50 22 29 20 28 62 79 74 | 65 2d 63 6f 64 65 20 22 |P") (byt|e-code "|
|00002750| c2 88 08 83 1b 00 c5 20 | 88 c6 20 88 c7 09 c2 c3 |....... |.. .....|
|00002760| c2 c8 0c 26 06 88 c9 20 | 82 21 00 ca 60 60 0c c2 |...&... |.!..``..|
|00002770| 24 87 22 20 5b 66 6c 61 | 67 20 73 68 65 6c 6c 2d |$." [fla|g shell-|
|00002780| 66 69 6c 65 2d 6e 61 6d | 65 20 6e 69 6c 20 74 20 |file-nam|e nil t |
|00002790| 63 6f 6d 6d 61 6e 64 20 | 62 61 72 66 2d 69 66 2d |command |barf-if-|
|000027a0| 62 75 66 66 65 72 2d 72 | 65 61 64 2d 6f 6e 6c 79 |buffer-r|ead-only|
|000027b0| 20 70 75 73 68 2d 6d 61 | 72 6b 20 63 61 6c 6c 2d | push-ma|rk call-|
|000027c0| 70 72 6f 63 65 73 73 20 | 22 2d 63 22 20 65 78 63 |process |"-c" exc|
|000027d0| 68 61 6e 67 65 2d 70 6f | 69 6e 74 2d 61 6e 64 2d |hange-po|int-and-|
|000027e0| 6d 61 72 6b 20 73 68 65 | 6c 6c 2d 63 6f 6d 6d 61 |mark she|ll-comma|
|000027f0| 6e 64 2d 6f 6e 2d 72 65 | 67 69 6f 6e 5d 20 39 29 |nd-on-re|gion] 9)|
|00002800| 29 0a 0a 28 64 65 66 75 | 6e 20 73 68 65 6c 6c 2d |)..(defu|n shell-|
|00002810| 63 6f 6d 6d 61 6e 64 2d | 6f 6e 2d 72 65 67 69 6f |command-|on-regio|
|00002820| 6e 20 28 73 74 61 72 74 | 20 65 6e 64 20 63 6f 6d |n (start| end com|
|00002830| 6d 61 6e 64 20 26 6f 70 | 74 69 6f 6e 61 6c 20 66 |mand &op|tional f|
|00002840| 6c 61 67 20 69 6e 74 65 | 72 61 63 74 69 76 65 29 |lag inte|ractive)|
|00002850| 20 22 5c 0a 45 78 65 63 | 75 74 65 20 73 74 72 69 | "\.Exec|ute stri|
|00002860| 6e 67 20 43 4f 4d 4d 41 | 4e 44 20 69 6e 20 69 6e |ng COMMA|ND in in|
|00002870| 66 65 72 69 6f 72 20 73 | 68 65 6c 6c 20 77 69 74 |ferior s|hell wit|
|00002880| 68 20 72 65 67 69 6f 6e | 20 61 73 20 69 6e 70 75 |h region| as inpu|
|00002890| 74 2e 0a 4e 6f 72 6d 61 | 6c 6c 79 20 64 69 73 70 |t..Norma|lly disp|
|000028a0| 6c 61 79 20 6f 75 74 70 | 75 74 20 28 69 66 20 61 |lay outp|ut (if a|
|000028b0| 6e 79 29 20 69 6e 20 74 | 65 6d 70 20 62 75 66 66 |ny) in t|emp buff|
|000028c0| 65 72 3b 0a 50 72 65 66 | 69 78 20 61 72 67 20 6d |er;.Pref|ix arg m|
|000028d0| 65 61 6e 73 20 72 65 70 | 6c 61 63 65 20 74 68 65 |eans rep|lace the|
|000028e0| 20 72 65 67 69 6f 6e 20 | 77 69 74 68 20 69 74 2e | region |with it.|
|000028f0| 0a 4e 6f 6e 69 6e 74 65 | 72 61 63 74 69 76 65 20 |.Noninte|ractive |
|00002900| 61 72 67 73 20 61 72 65 | 20 53 54 41 52 54 2c 20 |args are| START, |
|00002910| 45 4e 44 2c 20 43 4f 4d | 4d 41 4e 44 2c 20 46 4c |END, COM|MAND, FL|
|00002920| 41 47 2e 0a 4e 6f 6e 69 | 6e 74 65 72 61 63 74 69 |AG..Noni|nteracti|
|00002930| 76 65 6c 79 20 46 4c 41 | 47 20 6d 65 61 6e 73 20 |vely FLA|G means |
|00002940| 69 6e 73 65 72 74 20 6f | 75 74 70 75 74 20 69 6e |insert o|utput in|
|00002950| 20 70 6c 61 63 65 20 6f | 66 20 74 65 78 74 20 66 | place o|f text f|
|00002960| 72 6f 6d 20 53 54 41 52 | 54 20 74 6f 20 45 4e 44 |rom STAR|T to END|
|00002970| 2c 0a 61 6e 64 20 70 75 | 74 20 70 6f 69 6e 74 20 |,.and pu|t point |
|00002980| 61 74 20 74 68 65 20 65 | 6e 64 2c 20 62 75 74 20 |at the e|nd, but |
|00002990| 64 6f 6e 27 74 20 61 6c | 74 65 72 20 74 68 65 20 |don't al|ter the |
|000029a0| 6d 61 72 6b 2e 22 20 28 | 69 6e 74 65 72 61 63 74 |mark." (|interact|
|000029b0| 69 76 65 20 22 72 0a 73 | 53 68 65 6c 6c 20 63 6f |ive "r.s|Shell co|
|000029c0| 6d 6d 61 6e 64 20 6f 6e | 20 72 65 67 69 6f 6e 3a |mmand on| region:|
|000029d0| 20 0a 50 0a 70 22 29 20 | 28 62 79 74 65 2d 63 6f | .P.p") |(byte-co|
|000029e0| 64 65 20 22 c7 88 08 83 | 31 00 0a 85 0e 00 60 ca |de "....|1.....`.|
|000029f0| 20 57 19 0a 85 15 00 cb | 20 88 cc 0b 0c 0d c6 c6 | W......| .......|
|00002a00| c7 cd 0e 08 26 08 88 0a | 85 2d 00 09 85 2d 00 ce |....&...|.-...-..|
|00002a10| 20 29 82 88 00 cf d0 21 | 1e 09 0e 09 70 3d 83 56 | ).....!|....p=.V|
|00002a20| 00 d1 0c 64 5c 22 88 d1 | 65 0b 5c 22 88 cc 65 64 |...d\"..|e.\"..ed|
|00002a30| 0d c6 c6 c7 cd 0e 08 26 | 08 82 6c 00 8a 0e 09 71 |.......&|..l....q|
|00002a40| 88 d2 20 29 88 cc 0b 0c | 0d c7 0e 09 c7 cd 0e 08 |.. )....|........|
|00002a50| 26 08 88 8a 0e 09 71 88 | d3 20 d4 56 29 83 84 00 |&.....q.|. .V)...|
|00002a60| d5 d6 0e 09 21 d7 5c 22 | 82 87 00 d8 d9 21 29 87 |....!.\"|.....!).|
|00002a70| 22 20 5b 66 6c 61 67 20 | 73 77 61 70 20 69 6e 74 |" [flag |swap int|
|00002a80| 65 72 61 63 74 69 76 65 | 20 73 74 61 72 74 20 65 |eractive| start e|
|00002a90| 6e 64 20 73 68 65 6c 6c | 2d 66 69 6c 65 2d 6e 61 |nd shell|-file-na|
|00002aa0| 6d 65 20 74 20 6e 69 6c | 20 63 6f 6d 6d 61 6e 64 |me t nil| command|
|00002ab0| 20 62 75 66 66 65 72 20 | 6d 61 72 6b 20 70 75 73 | buffer |mark pus|
|00002ac0| 68 2d 6d 61 72 6b 20 63 | 61 6c 6c 2d 70 72 6f 63 |h-mark c|all-proc|
|00002ad0| 65 73 73 2d 72 65 67 69 | 6f 6e 20 22 2d 63 22 20 |ess-regi|on "-c" |
|00002ae0| 65 78 63 68 61 6e 67 65 | 2d 70 6f 69 6e 74 2d 61 |exchange|-point-a|
|00002af0| 6e 64 2d 6d 61 72 6b 20 | 67 65 74 2d 62 75 66 66 |nd-mark |get-buff|
|00002b00| 65 72 2d 63 72 65 61 74 | 65 20 22 2a 53 68 65 6c |er-creat|e "*Shel|
|00002b10| 6c 20 43 6f 6d 6d 61 6e | 64 20 4f 75 74 70 75 74 |l Comman|d Output|
|00002b20| 2a 22 20 64 65 6c 65 74 | 65 2d 72 65 67 69 6f 6e |*" delet|e-region|
|00002b30| 20 65 72 61 73 65 2d 62 | 75 66 66 65 72 20 62 75 | erase-b|uffer bu|
|00002b40| 66 66 65 72 2d 73 69 7a | 65 20 30 20 73 65 74 2d |ffer-siz|e 0 set-|
|00002b50| 77 69 6e 64 6f 77 2d 73 | 74 61 72 74 20 64 69 73 |window-s|tart dis|
|00002b60| 70 6c 61 79 2d 62 75 66 | 66 65 72 20 31 20 6d 65 |play-buf|fer 1 me|
|00002b70| 73 73 61 67 65 20 22 28 | 53 68 65 6c 6c 20 63 6f |ssage "(|Shell co|
|00002b80| 6d 6d 61 6e 64 20 63 6f | 6d 70 6c 65 74 65 64 20 |mmand co|mpleted |
|00002b90| 77 69 74 68 20 6e 6f 20 | 6f 75 74 70 75 74 29 22 |with no |output)"|
|00002ba0| 5d 20 31 38 29 29 0a 0a | 28 64 65 66 75 6e 20 75 |] 18))..|(defun u|
|00002bb0| 6e 69 76 65 72 73 61 6c | 2d 61 72 67 75 6d 65 6e |niversal|-argumen|
|00002bc0| 74 20 6e 69 6c 20 22 5c | 0a 42 65 67 69 6e 20 61 |t nil "\|.Begin a|
|00002bd0| 20 6e 75 6d 65 72 69 63 | 20 61 72 67 75 6d 65 6e | numeric| argumen|
|00002be0| 74 20 66 6f 72 20 74 68 | 65 20 66 6f 6c 6c 6f 77 |t for th|e follow|
|00002bf0| 69 6e 67 20 63 6f 6d 6d | 61 6e 64 2e 0a 44 69 67 |ing comm|and..Dig|
|00002c00| 69 74 73 20 6f 72 20 6d | 69 6e 75 73 20 73 69 67 |its or m|inus sig|
|00002c10| 6e 20 66 6f 6c 6c 6f 77 | 69 6e 67 20 5c 5c 5b 75 |n follow|ing \\[u|
|00002c20| 6e 69 76 65 72 73 61 6c | 2d 61 72 67 75 6d 65 6e |niversal|-argumen|
|00002c30| 74 5d 20 6d 61 6b 65 20 | 75 70 20 74 68 65 20 6e |t] make |up the n|
|00002c40| 75 6d 65 72 69 63 20 61 | 72 67 75 6d 65 6e 74 2e |umeric a|rgument.|
|00002c50| 0a 5c 5c 5b 75 6e 69 76 | 65 72 73 61 6c 2d 61 72 |.\\[univ|ersal-ar|
|00002c60| 67 75 6d 65 6e 74 5d 20 | 66 6f 6c 6c 6f 77 69 6e |gument] |followin|
|00002c70| 67 20 74 68 65 20 64 69 | 67 69 74 73 20 6f 72 20 |g the di|gits or |
|00002c80| 6d 69 6e 75 73 20 73 69 | 67 6e 20 65 6e 64 73 20 |minus si|gn ends |
|00002c90| 74 68 65 20 61 72 67 75 | 6d 65 6e 74 2e 0a 5c 5c |the argu|ment..\\|
|00002ca0| 5b 75 6e 69 76 65 72 73 | 61 6c 2d 61 72 67 75 6d |[univers|al-argum|
|00002cb0| 65 6e 74 5d 20 77 69 74 | 68 6f 75 74 20 64 69 67 |ent] wit|hout dig|
|00002cc0| 69 74 73 20 6f 72 20 6d | 69 6e 75 73 20 73 69 67 |its or m|inus sig|
|00002cd0| 6e 20 70 72 6f 76 69 64 | 65 73 20 34 20 61 73 20 |n provid|es 4 as |
|00002ce0| 61 72 67 75 6d 65 6e 74 | 2e 0a 52 65 70 65 61 74 |argument|..Repeat|
|00002cf0| 69 6e 67 20 5c 5c 5b 75 | 6e 69 76 65 72 73 61 6c |ing \\[u|niversal|
|00002d00| 2d 61 72 67 75 6d 65 6e | 74 5d 20 77 69 74 68 6f |-argumen|t] witho|
|00002d10| 75 74 20 64 69 67 69 74 | 73 20 6f 72 20 6d 69 6e |ut digit|s or min|
|00002d20| 75 73 20 73 69 67 6e 0a | 20 6d 75 6c 74 69 70 6c |us sign.| multipl|
|00002d30| 69 65 73 20 74 68 65 20 | 61 72 67 75 6d 65 6e 74 |ies the |argument|
|00002d40| 20 62 79 20 34 20 65 61 | 63 68 20 74 69 6d 65 2e | by 4 ea|ch time.|
|00002d50| 22 20 28 69 6e 74 65 72 | 61 63 74 69 76 65 20 6e |" (inter|active n|
|00002d60| 69 6c 29 20 28 62 79 74 | 65 2d 63 6f 64 65 20 22 |il) (byt|e-code "|
|00002d70| c0 88 c5 0b c0 1c 1a 19 | 72 89 14 88 0c 0a 55 85 |........|r.....U.|
|00002d80| 20 00 c6 c5 09 5c 22 89 | 11 88 72 89 14 88 82 0c | ....\".|..r.....|
|00002d90| 00 88 c7 0c 09 c0 23 2b | 87 22 20 5b 6e 69 6c 20 |......#+|." [nil |
|00002da0| 63 2d 75 20 61 72 67 73 | 74 61 72 74 63 68 61 72 |c-u args|tartchar|
|00002db0| 20 6c 61 73 74 2d 63 6f | 6d 6d 61 6e 64 2d 63 68 | last-co|mmand-ch|
|00002dc0| 61 72 20 63 68 61 72 20 | 34 20 2a 20 70 72 65 66 |ar char |4 * pref|
|00002dd0| 69 78 2d 61 72 67 2d 69 | 6e 74 65 72 6e 61 6c 5d |ix-arg-i|nternal]|
|00002de0| 20 35 29 29 0a 0a 28 64 | 65 66 75 6e 20 70 72 65 | 5))..(d|efun pre|
|00002df0| 66 69 78 2d 61 72 67 2d | 69 6e 74 65 72 6e 61 6c |fix-arg-|internal|
|00002e00| 20 28 63 68 61 72 20 63 | 2d 75 20 76 61 6c 75 65 | (char c|-u value|
|00002e10| 29 20 28 62 79 74 65 2d | 63 6f 64 65 20 22 c8 18 |) (byte-|code "..|
|00002e20| c9 09 21 85 0b 00 09 ca | 57 85 14 00 cb 10 09 5b |..!.....|W......[|
|00002e30| 89 11 88 09 cc 3d 85 20 | 00 cb 10 c2 89 11 88 cd |.....=. |........|
|00002e40| 0b 55 85 35 00 08 5b 10 | c2 89 14 88 72 89 13 88 |.U.5..[.|....r...|
|00002e50| 82 21 00 88 0b ce 59 85 | 3f 00 0b cf 58 85 60 00 |.!....Y.|?...X.`.|
|00002e60| d0 c9 09 21 83 4d 00 09 | 82 4e 00 ca d1 5c 22 0b |...!.M..|.N...\".|
|00002e70| ce 5a 5c 5c 11 c2 89 14 | 88 72 89 13 88 82 36 00 |.Z\\....|.r....6.|
|00002e80| 88 d2 0d d3 c8 0b 5c 22 | 5c 22 d4 3d 85 70 00 72 |......\"|\".=.p.r|
|00002e90| 89 13 88 0c 83 7a 00 0c | 43 82 8e 00 c9 09 21 83 |.....z..|C.....!.|
|00002ea0| 87 00 d0 09 08 5c 22 82 | 8e 00 08 cb 55 85 8e 00 |.....\".|....U...|
|00002eb0| cc 89 16 06 88 0b 89 16 | 07 29 87 22 20 5b 73 69 |........|.)." [si|
|00002ec0| 67 6e 20 76 61 6c 75 65 | 20 6e 69 6c 20 63 68 61 |gn value| nil cha|
|00002ed0| 72 20 63 2d 75 20 67 6c | 6f 62 61 6c 2d 6d 61 70 |r c-u gl|obal-map|
|00002ee0| 20 70 72 65 66 69 78 2d | 61 72 67 20 75 6e 72 65 | prefix-|arg unre|
|00002ef0| 61 64 2d 63 6f 6d 6d 61 | 6e 64 2d 63 68 61 72 20 |ad-comma|nd-char |
|00002f00| 31 20 6e 75 6d 62 65 72 | 70 20 30 20 2d 31 20 2d |1 number|p 0 -1 -|
|00002f10| 20 34 35 20 34 38 20 35 | 37 20 2a 20 31 30 20 6c | 45 48 5|7 * 10 l|
|00002f20| 6f 6f 6b 75 70 2d 6b 65 | 79 20 6d 61 6b 65 2d 73 |ookup-ke|y make-s|
|00002f30| 74 72 69 6e 67 20 75 6e | 69 76 65 72 73 61 6c 2d |tring un|iversal-|
|00002f40| 61 72 67 75 6d 65 6e 74 | 5d 20 39 29 29 0a 0a 28 |argument|] 9))..(|
|00002f50| 64 65 66 75 6e 20 64 69 | 67 69 74 2d 61 72 67 75 |defun di|git-argu|
|00002f60| 6d 65 6e 74 20 28 61 72 | 67 29 20 22 5c 0a 50 61 |ment (ar|g) "\.Pa|
|00002f70| 72 74 20 6f 66 20 74 68 | 65 20 6e 75 6d 65 72 69 |rt of th|e numeri|
|00002f80| 63 20 61 72 67 75 6d 65 | 6e 74 20 66 6f 72 20 74 |c argume|nt for t|
|00002f90| 68 65 20 6e 65 78 74 20 | 63 6f 6d 6d 61 6e 64 2e |he next |command.|
|00002fa0| 0a 5c 5c 5b 75 6e 69 76 | 65 72 73 61 6c 2d 61 72 |.\\[univ|ersal-ar|
|00002fb0| 67 75 6d 65 6e 74 5d 20 | 66 6f 6c 6c 6f 77 69 6e |gument] |followin|
|00002fc0| 67 20 64 69 67 69 74 73 | 20 6f 72 20 6d 69 6e 75 |g digits| or minu|
|00002fd0| 73 20 73 69 67 6e 20 65 | 6e 64 73 20 74 68 65 20 |s sign e|nds the |
|00002fe0| 61 72 67 75 6d 65 6e 74 | 2e 22 20 28 69 6e 74 65 |argument|." (inte|
|00002ff0| 72 61 63 74 69 76 65 20 | 22 50 22 29 20 28 62 79 |ractive |"P") (by|
|00003000| 74 65 2d 63 6f 64 65 20 | 22 c1 88 c3 08 c1 0a 23 |te-code |"......#|
|00003010| 87 22 20 5b 6c 61 73 74 | 2d 63 6f 6d 6d 61 6e 64 |." [last|-command|
|00003020| 2d 63 68 61 72 20 6e 69 | 6c 20 61 72 67 20 70 72 |-char ni|l arg pr|
|00003030| 65 66 69 78 2d 61 72 67 | 2d 69 6e 74 65 72 6e 61 |efix-arg|-interna|
|00003040| 6c 5d 20 34 29 29 0a 0a | 28 64 65 66 75 6e 20 6e |l] 4))..|(defun n|
|00003050| 65 67 61 74 69 76 65 2d | 61 72 67 75 6d 65 6e 74 |egative-|argument|
|00003060| 20 28 61 72 67 29 20 22 | 5c 0a 42 65 67 69 6e 20 | (arg) "|\.Begin |
|00003070| 61 20 6e 65 67 61 74 69 | 76 65 20 6e 75 6d 65 72 |a negati|ve numer|
|00003080| 69 63 20 61 72 67 75 6d | 65 6e 74 20 66 6f 72 20 |ic argum|ent for |
|00003090| 74 68 65 20 6e 65 78 74 | 20 63 6f 6d 6d 61 6e 64 |the next| command|
|000030a0| 2e 0a 5c 5c 5b 75 6e 69 | 76 65 72 73 61 6c 2d 61 |..\\[uni|versal-a|
|000030b0| 72 67 75 6d 65 6e 74 5d | 20 66 6f 6c 6c 6f 77 69 |rgument]| followi|
|000030c0| 6e 67 20 64 69 67 69 74 | 73 20 6f 72 20 6d 69 6e |ng digit|s or min|
|000030d0| 75 73 20 73 69 67 6e 20 | 65 6e 64 73 20 74 68 65 |us sign |ends the|
|000030e0| 20 61 72 67 75 6d 65 6e | 74 2e 22 20 28 69 6e 74 | argumen|t." (int|
|000030f0| 65 72 61 63 74 69 76 65 | 20 22 50 22 29 20 28 62 |eractive| "P") (b|
|00003100| 79 74 65 2d 63 6f 64 65 | 20 22 c0 88 c2 c3 c0 09 |yte-code| "......|
|00003110| 23 87 22 20 5b 6e 69 6c | 20 61 72 67 20 70 72 65 |#." [nil| arg pre|
|00003120| 66 69 78 2d 61 72 67 2d | 69 6e 74 65 72 6e 61 6c |fix-arg-|internal|
|00003130| 20 34 35 5d 20 34 29 29 | 0a 0a 28 64 65 66 75 6e | 45] 4))|..(defun|
|00003140| 20 66 6f 72 77 61 72 64 | 2d 74 6f 2d 69 6e 64 65 | forward|-to-inde|
|00003150| 6e 74 61 74 69 6f 6e 20 | 28 61 72 67 29 20 22 5c |ntation |(arg) "\|
|00003160| 0a 4d 6f 76 65 20 66 6f | 72 77 61 72 64 20 41 52 |.Move fo|rward AR|
|00003170| 47 20 6c 69 6e 65 73 20 | 61 6e 64 20 70 6f 73 69 |G lines |and posi|
|00003180| 74 69 6f 6e 20 61 74 20 | 66 69 72 73 74 20 6e 6f |tion at |first no|
|00003190| 6e 62 6c 61 6e 6b 20 63 | 68 61 72 61 63 74 65 72 |nblank c|haracter|
|000031a0| 2e 22 20 28 69 6e 74 65 | 72 61 63 74 69 76 65 20 |." (inte|ractive |
|000031b0| 22 70 22 29 20 28 62 79 | 74 65 2d 63 6f 64 65 20 |"p") (by|te-code |
|000031c0| 22 c1 88 c2 08 21 88 c3 | c4 21 87 22 20 5b 61 72 |"....!..|.!." [ar|
|000031d0| 67 20 6e 69 6c 20 66 6f | 72 77 61 72 64 2d 6c 69 |g nil fo|rward-li|
|000031e0| 6e 65 20 73 6b 69 70 2d | 63 68 61 72 73 2d 66 6f |ne skip-|chars-fo|
|000031f0| 72 77 61 72 64 20 22 20 | 09 22 5d 20 33 29 29 0a |rward " |."] 3)).|
|00003200| 0a 28 64 65 66 75 6e 20 | 62 61 63 6b 77 61 72 64 |.(defun |backward|
|00003210| 2d 74 6f 2d 69 6e 64 65 | 6e 74 61 74 69 6f 6e 20 |-to-inde|ntation |
|00003220| 28 61 72 67 29 20 22 5c | 0a 4d 6f 76 65 20 62 61 |(arg) "\|.Move ba|
|00003230| 63 6b 77 61 72 64 20 41 | 52 47 20 6c 69 6e 65 73 |ckward A|RG lines|
|00003240| 20 61 6e 64 20 70 6f 73 | 69 74 69 6f 6e 20 61 74 | and pos|ition at|
|00003250| 20 66 69 72 73 74 20 6e | 6f 6e 62 6c 61 6e 6b 20 | first n|onblank |
|00003260| 63 68 61 72 61 63 74 65 | 72 2e 22 20 28 69 6e 74 |characte|r." (int|
|00003270| 65 72 61 63 74 69 76 65 | 20 22 70 22 29 20 28 62 |eractive| "p") (b|
|00003280| 79 74 65 2d 63 6f 64 65 | 20 22 c1 88 c2 08 5b 21 |yte-code| "....[!|
|00003290| 88 c3 c4 21 87 22 20 5b | 61 72 67 20 6e 69 6c 20 |...!." [|arg nil |
|000032a0| 66 6f 72 77 61 72 64 2d | 6c 69 6e 65 20 73 6b 69 |forward-|line ski|
|000032b0| 70 2d 63 68 61 72 73 2d | 66 6f 72 77 61 72 64 20 |p-chars-|forward |
|000032c0| 22 20 09 22 5d 20 33 29 | 29 0a 0a 28 64 65 66 75 |" ."] 3)|)..(defu|
|000032d0| 6e 20 6b 69 6c 6c 2d 6c | 69 6e 65 20 28 26 6f 70 |n kill-l|ine (&op|
|000032e0| 74 69 6f 6e 61 6c 20 61 | 72 67 29 20 22 5c 0a 4b |tional a|rg) "\.K|
|000032f0| 69 6c 6c 20 74 68 65 20 | 72 65 73 74 20 6f 66 20 |ill the |rest of |
|00003300| 74 68 65 20 63 75 72 72 | 65 6e 74 20 6c 69 6e 65 |the curr|ent line|
|00003310| 3b 20 69 66 20 6e 6f 20 | 6e 6f 6e 62 6c 61 6e 6b |; if no |nonblank|
|00003320| 73 20 74 68 65 72 65 2c | 20 6b 69 6c 6c 20 74 68 |s there,| kill th|
|00003330| 72 75 20 6e 65 77 6c 69 | 6e 65 2e 0a 57 69 74 68 |ru newli|ne..With|
|00003340| 20 70 72 65 66 69 78 20 | 61 72 67 75 6d 65 6e 74 | prefix |argument|
|00003350| 2c 20 6b 69 6c 6c 20 74 | 68 61 74 20 6d 61 6e 79 |, kill t|hat many|
|00003360| 20 6c 69 6e 65 73 20 66 | 72 6f 6d 20 70 6f 69 6e | lines f|rom poin|
|00003370| 74 2e 0a 4e 65 67 61 74 | 69 76 65 20 61 72 67 75 |t..Negat|ive argu|
|00003380| 6d 65 6e 74 73 20 6b 69 | 6c 6c 20 6c 69 6e 65 73 |ments ki|ll lines|
|00003390| 20 62 61 63 6b 77 61 72 | 64 2e 0a 0a 57 68 65 6e | backwar|d...When|
|000033a0| 20 63 61 6c 6c 69 6e 67 | 20 66 72 6f 6d 20 61 20 | calling| from a |
|000033b0| 70 72 6f 67 72 61 6d 2c | 20 6e 69 6c 20 6d 65 61 |program,| nil mea|
|000033c0| 6e 73 20 5c 22 6e 6f 20 | 61 72 67 5c 22 2c 0a 61 |ns \"no |arg\",.a|
|000033d0| 20 6e 75 6d 62 65 72 20 | 63 6f 75 6e 74 73 20 61 | number |counts a|
|000033e0| 73 20 61 20 70 72 65 66 | 69 78 20 61 72 67 2e 22 |s a pref|ix arg."|
|000033f0| 20 28 69 6e 74 65 72 61 | 63 74 69 76 65 20 22 2a | (intera|ctive "*|
|00003400| 50 22 29 20 28 62 79 74 | 65 2d 63 6f 64 65 20 22 |P") (byt|e-code "|
|00003410| c1 88 c2 60 08 83 10 00 | c3 c4 08 21 21 82 27 00 |...`....|...!!.'.|
|00003420| 6d 85 18 00 c5 c6 c1 5c | 22 88 c7 c8 21 83 25 00 |m......\|"...!.%.|
|00003430| c3 c9 21 82 27 00 ca 20 | 88 60 5c 22 87 22 20 5b |..!.'.. |.`\"." [|
|00003440| 61 72 67 20 6e 69 6c 20 | 6b 69 6c 6c 2d 72 65 67 |arg nil |kill-reg|
|00003450| 69 6f 6e 20 66 6f 72 77 | 61 72 64 2d 6c 69 6e 65 |ion forw|ard-line|
|00003460| 20 70 72 65 66 69 78 2d | 6e 75 6d 65 72 69 63 2d | prefix-|numeric-|
|00003470| 76 61 6c 75 65 20 73 69 | 67 6e 61 6c 20 65 6e 64 |value si|gnal end|
|00003480| 2d 6f 66 2d 62 75 66 66 | 65 72 20 6c 6f 6f 6b 69 |-of-buff|er looki|
|00003490| 6e 67 2d 61 74 20 22 5b | 20 09 5d 2a 24 22 20 31 |ng-at "[| .]*$" 1|
|000034a0| 20 65 6e 64 2d 6f 66 2d | 6c 69 6e 65 5d 20 39 29 | end-of-|line] 9)|
|000034b0| 29 0a 0a 28 64 65 66 76 | 61 72 20 6b 69 6c 6c 2d |)..(defv|ar kill-|
|000034c0| 72 69 6e 67 20 6e 69 6c | 20 22 5c 0a 4c 69 73 74 |ring nil| "\.List|
|000034d0| 20 6f 66 20 6b 69 6c 6c | 65 64 20 74 65 78 74 20 | of kill|ed text |
|000034e0| 73 65 71 75 65 6e 63 65 | 73 2e 22 29 0a 0a 28 64 |sequence|s.")..(d|
|000034f0| 65 66 63 6f 6e 73 74 20 | 6b 69 6c 6c 2d 72 69 6e |efconst |kill-rin|
|00003500| 67 2d 6d 61 78 20 33 30 | 20 22 5c 0a 2a 4d 61 78 |g-max 30| "\.*Max|
|00003510| 69 6d 75 6d 20 6c 65 6e | 67 74 68 20 6f 66 20 6b |imum len|gth of k|
|00003520| 69 6c 6c 20 72 69 6e 67 | 20 62 65 66 6f 72 65 20 |ill ring| before |
|00003530| 6f 6c 64 65 73 74 20 65 | 6c 65 6d 65 6e 74 73 20 |oldest e|lements |
|00003540| 61 72 65 20 74 68 72 6f | 77 6e 20 61 77 61 79 2e |are thro|wn away.|
|00003550| 22 29 0a 0a 28 64 65 66 | 76 61 72 20 6b 69 6c 6c |")..(def|var kill|
|00003560| 2d 72 69 6e 67 2d 79 61 | 6e 6b 2d 70 6f 69 6e 74 |-ring-ya|nk-point|
|00003570| 65 72 20 6e 69 6c 20 22 | 5c 0a 54 68 65 20 74 61 |er nil "|\.The ta|
|00003580| 69 6c 20 6f 66 20 74 68 | 65 20 6b 69 6c 6c 20 72 |il of th|e kill r|
|00003590| 69 6e 67 20 77 68 6f 73 | 65 20 63 61 72 20 69 73 |ing whos|e car is|
|000035a0| 20 74 68 65 20 6c 61 73 | 74 20 74 68 69 6e 67 20 | the las|t thing |
|000035b0| 79 61 6e 6b 65 64 2e 22 | 29 0a 0a 28 69 66 20 28 |yanked."|)..(if (|
|000035c0| 65 71 20 73 79 73 74 65 | 6d 2d 74 79 70 65 20 28 |eq syste|m-type (|
|000035d0| 71 75 6f 74 65 20 61 6d | 69 67 61 64 6f 73 29 29 |quote am|igados))|
|000035e0| 20 28 70 72 6f 67 6e 20 | 28 64 65 66 75 6e 20 73 | (progn |(defun s|
|000035f0| 61 66 65 2d 61 6d 69 67 | 61 2d 70 61 73 74 65 20 |afe-amig|a-paste |
|00003600| 6e 69 6c 20 22 50 61 73 | 74 65 20 66 72 6f 6d 20 |nil "Pas|te from |
|00003610| 74 68 65 20 61 6d 69 67 | 61 20 63 6c 69 70 62 6f |the amig|a clipbo|
|00003620| 61 72 64 2c 20 74 72 61 | 70 70 69 6e 67 20 61 6e |ard, tra|pping an|
|00003630| 79 20 65 72 72 6f 72 73 | 2e 22 20 28 63 6f 6e 64 |y errors|." (cond|
|00003640| 69 74 69 6f 6e 2d 63 61 | 73 65 20 6e 69 6c 20 28 |ition-ca|se nil (|
|00003650| 61 6d 69 67 61 2d 70 61 | 73 74 65 29 20 28 65 72 |amiga-pa|ste) (er|
|00003660| 72 6f 72 20 6e 69 6c 29 | 29 29 20 28 64 65 66 75 |ror nil)|)) (defu|
|00003670| 6e 20 63 68 65 63 6b 2d | 63 6c 69 70 62 6f 61 72 |n check-|clipboar|
|00003680| 64 20 6e 69 6c 20 22 49 | 66 20 74 68 65 72 65 20 |d nil "I|f there |
|00003690| 69 73 20 61 6e 79 74 68 | 69 6e 67 20 6e 65 77 20 |is anyth|ing new |
|000036a0| 69 6e 20 74 68 65 20 63 | 6c 69 70 62 6f 61 72 64 |in the c|lipboard|
|000036b0| 2c 20 61 64 64 20 69 74 | 20 74 6f 20 74 68 65 20 |, add it| to the |
|000036c0| 65 6d 61 63 73 20 6b 69 | 6c 6c 20 72 69 6e 67 2e |emacs ki|ll ring.|
|000036d0| 0a 52 65 74 75 72 6e 73 | 20 74 20 69 66 20 74 68 |.Returns| t if th|
|000036e0| 65 72 65 20 77 61 73 20 | 73 6f 6d 65 74 68 69 6e |ere was |somethin|
|000036f0| 67 20 61 64 64 65 64 2c | 20 6e 69 6c 20 6f 74 68 |g added,| nil oth|
|00003700| 65 72 77 69 73 65 2e 22 | 20 28 6c 65 74 20 28 61 |erwise."| (let (a|
|00003710| 64 64 65 64 29 20 28 69 | 66 20 61 6d 69 67 61 2d |dded) (i|f amiga-|
|00003720| 6e 65 77 2d 63 6c 69 70 | 20 28 6c 65 74 20 28 28 |new-clip| (let ((|
|00003730| 73 74 72 20 28 73 61 66 | 65 2d 61 6d 69 67 61 2d |str (saf|e-amiga-|
|00003740| 70 61 73 74 65 29 29 29 | 20 28 73 65 74 71 20 61 |paste)))| (setq a|
|00003750| 6d 69 67 61 2d 6e 65 77 | 2d 63 6c 69 70 20 6e 69 |miga-new|-clip ni|
|00003760| 6c 29 20 28 69 66 20 73 | 74 72 20 28 70 72 6f 67 |l) (if s|tr (prog|
|00003770| 6e 20 28 6b 69 6c 6c 2d | 61 64 64 20 73 74 72 29 |n (kill-|add str)|
|00003780| 20 28 73 65 74 71 20 61 | 64 64 65 64 20 74 29 20 | (setq a|dded t) |
|00003790| 28 73 65 74 71 20 6b 69 | 6c 6c 2d 72 69 6e 67 2d |(setq ki|ll-ring-|
|000037a0| 79 61 6e 6b 2d 70 6f 69 | 6e 74 65 72 20 6b 69 6c |yank-poi|nter kil|
|000037b0| 6c 2d 72 69 6e 67 29 29 | 29 29 29 20 61 64 64 65 |l-ring))|))) adde|
|000037c0| 64 29 29 20 28 64 65 66 | 75 6e 20 75 70 64 61 74 |d)) (def|un updat|
|000037d0| 65 2d 63 6c 69 70 62 6f | 61 72 64 20 28 73 74 72 |e-clipbo|ard (str|
|000037e0| 29 20 28 61 6d 69 67 61 | 2d 63 75 74 20 73 74 72 |) (amiga|-cut str|
|000037f0| 29 20 28 73 65 74 71 20 | 61 6d 69 67 61 2d 6e 65 |) (setq |amiga-ne|
|00003800| 77 2d 63 6c 69 70 20 6e | 69 6c 29 29 29 20 28 70 |w-clip n|il))) (p|
|00003810| 72 6f 67 6e 20 28 64 65 | 66 75 6e 20 63 68 65 63 |rogn (de|fun chec|
|00003820| 6b 2d 63 6c 69 70 62 6f | 61 72 64 20 6e 69 6c 20 |k-clipbo|ard nil |
|00003830| 6e 69 6c 29 20 28 64 65 | 66 75 6e 20 75 70 64 61 |nil) (de|fun upda|
|00003840| 74 65 2d 63 6c 69 70 62 | 6f 61 72 64 20 6e 69 6c |te-clipb|oard nil|
|00003850| 20 6e 69 6c 29 29 29 0a | 0a 28 64 65 66 75 6e 20 | nil))).|.(defun |
|00003860| 6b 69 6c 6c 2d 61 70 70 | 65 6e 64 20 28 73 74 72 |kill-app|end (str|
|00003870| 69 6e 67 20 62 65 66 6f | 72 65 2d 70 29 20 28 62 |ing befo|re-p) (b|
|00003880| 79 74 65 2d 63 6f 64 65 | 20 22 c3 08 09 83 0d 00 |yte-code| "......|
|00003890| 0a 08 40 50 82 11 00 08 | 40 0a 50 5c 22 88 c4 08 |..@P....|@.P\"...|
|000038a0| 40 21 87 22 20 5b 6b 69 | 6c 6c 2d 72 69 6e 67 20 |@!." [ki|ll-ring |
|000038b0| 62 65 66 6f 72 65 2d 70 | 20 73 74 72 69 6e 67 20 |before-p| string |
|000038c0| 73 65 74 63 61 72 20 75 | 70 64 61 74 65 2d 63 6c |setcar u|pdate-cl|
|000038d0| 69 70 62 6f 61 72 64 5d | 20 34 29 29 0a 0a 28 64 |ipboard]| 4))..(d|
|000038e0| 65 66 75 6e 20 6b 69 6c | 6c 2d 61 64 64 20 28 73 |efun kil|l-add (s|
|000038f0| 74 72 69 6e 67 29 20 28 | 62 79 74 65 2d 63 6f 64 |tring) (|byte-cod|
|00003900| 65 20 22 c4 20 88 09 08 | 42 89 10 88 c5 09 21 88 |e ". ...|B.....!.|
|00003910| 08 47 0a 56 85 1c 00 c6 | c7 0a 53 08 5c 22 c3 5c |.G.V....|..S.\".\|
|00003920| 22 87 22 20 5b 6b 69 6c | 6c 2d 72 69 6e 67 20 73 |"." [kil|l-ring s|
|00003930| 74 72 69 6e 67 20 6b 69 | 6c 6c 2d 72 69 6e 67 2d |tring ki|ll-ring-|
|00003940| 6d 61 78 20 6e 69 6c 20 | 63 68 65 63 6b 2d 63 6c |max nil |check-cl|
|00003950| 69 70 62 6f 61 72 64 20 | 75 70 64 61 74 65 2d 63 |ipboard |update-c|
|00003960| 6c 69 70 62 6f 61 72 64 | 20 73 65 74 63 64 72 20 |lipboard| setcdr |
|00003970| 6e 74 68 63 64 72 5d 20 | 36 29 29 0a 0a 28 64 65 |nthcdr] |6))..(de|
|00003980| 66 75 6e 20 6b 69 6c 6c | 2d 72 65 67 69 6f 6e 20 |fun kill|-region |
|00003990| 28 62 65 67 20 65 6e 64 | 29 20 22 5c 0a 4b 69 6c |(beg end|) "\.Kil|
|000039a0| 6c 20 62 65 74 77 65 65 | 6e 20 70 6f 69 6e 74 20 |l betwee|n point |
|000039b0| 61 6e 64 20 6d 61 72 6b | 2e 0a 54 68 65 20 74 65 |and mark|..The te|
|000039c0| 78 74 20 69 73 20 64 65 | 6c 65 74 65 64 20 62 75 |xt is de|leted bu|
|000039d0| 74 20 73 61 76 65 64 20 | 69 6e 20 74 68 65 20 6b |t saved |in the k|
|000039e0| 69 6c 6c 20 72 69 6e 67 | 2e 0a 54 68 65 20 63 6f |ill ring|..The co|
|000039f0| 6d 6d 61 6e 64 20 5c 5c | 5b 79 61 6e 6b 5d 20 63 |mmand \\|[yank] c|
|00003a00| 61 6e 20 72 65 74 72 69 | 65 76 65 20 69 74 20 66 |an retri|eve it f|
|00003a10| 72 6f 6d 20 74 68 65 72 | 65 2e 0a 28 49 66 20 79 |rom ther|e..(If y|
|00003a20| 6f 75 20 77 61 6e 74 20 | 74 6f 20 6b 69 6c 6c 20 |ou want |to kill |
|00003a30| 61 6e 64 20 74 68 65 6e | 20 79 61 6e 6b 20 69 6d |and then| yank im|
|00003a40| 6d 65 64 69 61 74 65 6c | 79 2c 20 75 73 65 20 5c |mediatel|y, use \|
|00003a50| 5c 5b 63 6f 70 79 2d 72 | 65 67 69 6f 6e 2d 61 73 |\[copy-r|egion-as|
|00003a60| 2d 6b 69 6c 6c 5d 2e 29 | 0a 0a 54 68 69 73 20 69 |-kill].)|..This i|
|00003a70| 73 20 74 68 65 20 70 72 | 69 6d 69 74 69 76 65 20 |s the pr|imitive |
|00003a80| 66 6f 72 20 70 72 6f 67 | 72 61 6d 73 20 74 6f 20 |for prog|rams to |
|00003a90| 6b 69 6c 6c 20 74 65 78 | 74 20 28 61 73 20 6f 70 |kill tex|t (as op|
|00003aa0| 70 6f 73 65 64 20 74 6f | 20 64 65 6c 65 74 69 6e |posed to| deletin|
|00003ab0| 67 20 69 74 29 2e 0a 53 | 75 70 70 6c 79 20 74 77 |g it)..S|upply tw|
|00003ac0| 6f 20 61 72 67 75 6d 65 | 6e 74 73 2c 20 63 68 61 |o argume|nts, cha|
|00003ad0| 72 61 63 74 65 72 20 6e | 75 6d 62 65 72 73 20 69 |racter n|umbers i|
|00003ae0| 6e 64 69 63 61 74 69 6e | 67 20 74 68 65 20 73 74 |ndicatin|g the st|
|00003af0| 72 65 74 63 68 20 6f 66 | 20 74 65 78 74 0a 20 74 |retch of| text. t|
|00003b00| 6f 20 62 65 20 6b 69 6c | 6c 65 64 2e 0a 41 6e 79 |o be kil|led..Any|
|00003b10| 20 63 6f 6d 6d 61 6e 64 | 20 74 68 61 74 20 63 61 | command| that ca|
|00003b20| 6c 6c 73 20 74 68 69 73 | 20 66 75 6e 63 74 69 6f |lls this| functio|
|00003b30| 6e 20 69 73 20 61 20 5c | 22 6b 69 6c 6c 20 63 6f |n is a \|"kill co|
|00003b40| 6d 6d 61 6e 64 5c 22 2e | 0a 49 66 20 74 68 65 20 |mmand\".|.If the |
|00003b50| 70 72 65 76 69 6f 75 73 | 20 63 6f 6d 6d 61 6e 64 |previous| command|
|00003b60| 20 77 61 73 20 61 6c 73 | 6f 20 61 20 6b 69 6c 6c | was als|o a kill|
|00003b70| 20 63 6f 6d 6d 61 6e 64 | 2c 0a 74 68 65 20 74 65 | command|,.the te|
|00003b80| 78 74 20 6b 69 6c 6c 65 | 64 20 74 68 69 73 20 74 |xt kille|d this t|
|00003b90| 69 6d 65 20 61 70 70 65 | 6e 64 73 20 74 6f 20 74 |ime appe|nds to t|
|00003ba0| 68 65 20 74 65 78 74 20 | 6b 69 6c 6c 65 64 20 6c |he text |killed l|
|00003bb0| 61 73 74 20 74 69 6d 65 | 0a 74 6f 20 6d 61 6b 65 |ast time|.to make|
|00003bc0| 20 6f 6e 65 20 65 6e 74 | 72 79 20 69 6e 20 74 68 | one ent|ry in th|
|00003bd0| 65 20 6b 69 6c 6c 20 72 | 69 6e 67 2e 22 20 28 69 |e kill r|ing." (i|
|00003be0| 6e 74 65 72 61 63 74 69 | 76 65 20 22 2a 72 22 29 |nteracti|ve "*r")|
|00003bf0| 20 28 62 79 74 65 2d 63 | 6f 64 65 20 22 ca 88 08 | (byte-c|ode "...|
|00003c00| c1 3d 3f 85 19 00 0a cb | 3d 3f 85 19 00 0b 0c 3d |.=?.....|=?.....=|
|00003c10| 3f 85 19 00 0d 3f 83 40 | 00 0b 0c 5d 0b 0c 5e 5a |?....?.@|...]..^Z|
|00003c20| cc 5c 5c 1e 06 cd 0b 0c | 5c 22 88 ce 08 40 40 21 |.\\.....|\"...@@!|
|00003c30| 88 cb 89 16 07 88 0e 09 | 89 16 08 29 82 49 00 cf |........|...).I..|
|00003c40| 0b 0c 5c 22 88 cd 0b 0c | 5c 22 87 22 20 5b 62 75 |..\"....|\"." [bu|
|00003c50| 66 66 65 72 2d 75 6e 64 | 6f 2d 6c 69 73 74 20 74 |ffer-und|o-list t|
|00003c60| 20 6c 61 73 74 2d 63 6f | 6d 6d 61 6e 64 20 62 65 | last-co|mmand be|
|00003c70| 67 20 65 6e 64 20 62 75 | 66 66 65 72 2d 72 65 61 |g end bu|ffer-rea|
|00003c80| 64 2d 6f 6e 6c 79 20 75 | 6e 64 6f 2d 68 69 67 68 |d-only u|ndo-high|
|00003c90| 2d 74 68 72 65 73 68 6f | 6c 64 20 74 68 69 73 2d |-thresho|ld this-|
|00003ca0| 63 6f 6d 6d 61 6e 64 20 | 6b 69 6c 6c 2d 72 69 6e |command |kill-rin|
|00003cb0| 67 2d 79 61 6e 6b 2d 70 | 6f 69 6e 74 65 72 20 6b |g-yank-p|ointer k|
|00003cc0| 69 6c 6c 2d 72 69 6e 67 | 20 6e 69 6c 20 6b 69 6c |ill-ring| nil kil|
|00003cd0| 6c 2d 72 65 67 69 6f 6e | 20 31 30 30 20 64 65 6c |l-region| 100 del|
|00003ce0| 65 74 65 2d 72 65 67 69 | 6f 6e 20 6b 69 6c 6c 2d |ete-regi|on kill-|
|00003cf0| 61 64 64 20 63 6f 70 79 | 2d 72 65 67 69 6f 6e 2d |add copy|-region-|
|00003d00| 61 73 2d 6b 69 6c 6c 5d | 20 36 29 29 0a 0a 28 66 |as-kill]| 6))..(f|
|00003d10| 73 65 74 20 28 71 75 6f | 74 65 20 6b 69 6c 6c 2d |set (quo|te kill-|
|00003d20| 72 69 6e 67 2d 73 61 76 | 65 29 20 28 71 75 6f 74 |ring-sav|e) (quot|
|00003d30| 65 20 63 6f 70 79 2d 72 | 65 67 69 6f 6e 2d 61 73 |e copy-r|egion-as|
|00003d40| 2d 6b 69 6c 6c 29 29 0a | 0a 28 64 65 66 75 6e 20 |-kill)).|.(defun |
|00003d50| 63 6f 70 79 2d 72 65 67 | 69 6f 6e 2d 61 73 2d 6b |copy-reg|ion-as-k|
|00003d60| 69 6c 6c 20 28 62 65 67 | 20 65 6e 64 29 20 22 5c |ill (beg| end) "\|
|00003d70| 0a 53 61 76 65 20 74 68 | 65 20 72 65 67 69 6f 6e |.Save th|e region|
|00003d80| 20 61 73 20 69 66 20 6b | 69 6c 6c 65 64 2c 20 62 | as if k|illed, b|
|00003d90| 75 74 20 64 6f 6e 27 74 | 20 6b 69 6c 6c 20 69 74 |ut don't| kill it|
|00003da0| 2e 22 20 28 69 6e 74 65 | 72 61 63 74 69 76 65 20 |." (inte|ractive |
|00003db0| 22 72 22 29 20 28 62 79 | 74 65 2d 63 6f 64 65 20 |"r") (by|te-code |
|00003dc0| 22 c6 88 08 c7 3d 85 0b | 00 c8 20 3f 83 1a 00 c9 |"....=..|.. ?....|
|00003dd0| ca 09 0a 5c 22 0a 09 57 | 5c 22 82 20 00 cb ca 09 |...\"..W|\". ....|
|00003de0| 0a 5c 22 21 88 c7 89 13 | 88 0d 89 14 87 22 20 5b |.\"!....|....." [|
|00003df0| 6c 61 73 74 2d 63 6f 6d | 6d 61 6e 64 20 62 65 67 |last-com|mand beg|
|00003e00| 20 65 6e 64 20 74 68 69 | 73 2d 63 6f 6d 6d 61 6e | end thi|s-comman|
|00003e10| 64 20 6b 69 6c 6c 2d 72 | 69 6e 67 2d 79 61 6e 6b |d kill-r|ing-yank|
|00003e20| 2d 70 6f 69 6e 74 65 72 | 20 6b 69 6c 6c 2d 72 69 |-pointer| kill-ri|
|00003e30| 6e 67 20 6e 69 6c 20 6b | 69 6c 6c 2d 72 65 67 69 |ng nil k|ill-regi|
|00003e40| 6f 6e 20 63 68 65 63 6b | 2d 63 6c 69 70 62 6f 61 |on check|-clipboa|
|00003e50| 72 64 20 6b 69 6c 6c 2d | 61 70 70 65 6e 64 20 62 |rd kill-|append b|
|00003e60| 75 66 66 65 72 2d 73 75 | 62 73 74 72 69 6e 67 20 |uffer-su|bstring |
|00003e70| 6b 69 6c 6c 2d 61 64 64 | 5d 20 37 29 29 0a 0a 28 |kill-add|] 7))..(|
|00003e80| 64 65 66 75 6e 20 61 70 | 70 65 6e 64 2d 6e 65 78 |defun ap|pend-nex|
|00003e90| 74 2d 6b 69 6c 6c 20 6e | 69 6c 20 22 5c 0a 43 61 |t-kill n|il "\.Ca|
|00003ea0| 75 73 65 20 66 6f 6c 6c | 6f 77 69 6e 67 20 63 6f |use foll|owing co|
|00003eb0| 6d 6d 61 6e 64 2c 20 69 | 66 20 6b 69 6c 6c 2c 20 |mmand, i|f kill, |
|00003ec0| 74 6f 20 61 70 70 65 6e | 64 20 74 6f 20 70 72 65 |to appen|d to pre|
|00003ed0| 76 69 6f 75 73 20 6b 69 | 6c 6c 2e 22 20 28 69 6e |vious ki|ll." (in|
|00003ee0| 74 65 72 61 63 74 69 76 | 65 29 20 28 62 79 74 65 |teractiv|e) (byte|
|00003ef0| 2d 63 6f 64 65 20 22 c2 | 88 74 83 0c 00 c3 89 10 |-code ".|.t......|
|00003f00| 82 0f 00 c3 89 11 87 22 | 20 5b 74 68 69 73 2d 63 |......."| [this-c|
|00003f10| 6f 6d 6d 61 6e 64 20 6c | 61 73 74 2d 63 6f 6d 6d |ommand l|ast-comm|
|00003f20| 61 6e 64 20 6e 69 6c 20 | 6b 69 6c 6c 2d 72 65 67 |and nil |kill-reg|
|00003f30| 69 6f 6e 5d 20 32 29 29 | 0a 0a 28 64 65 66 75 6e |ion] 2))|..(defun|
|00003f40| 20 72 6f 74 61 74 65 2d | 79 61 6e 6b 2d 70 6f 69 | rotate-|yank-poi|
|00003f50| 6e 74 65 72 20 28 61 72 | 67 29 20 22 5c 0a 52 6f |nter (ar|g) "\.Ro|
|00003f60| 74 61 74 65 20 74 68 65 | 20 79 61 6e 6b 69 6e 67 |tate the| yanking|
|00003f70| 20 70 6f 69 6e 74 20 69 | 6e 20 74 68 65 20 6b 69 | point i|n the ki|
|00003f80| 6c 6c 20 72 69 6e 67 2e | 22 20 28 69 6e 74 65 72 |ll ring.|" (inter|
|00003f90| 61 63 74 69 76 65 20 22 | 70 22 29 20 28 62 79 74 |active "|p") (byt|
|00003fa0| 65 2d 63 6f 64 65 20 22 | c4 88 09 47 18 c5 08 21 |e-code "|...G...!|
|00003fb0| 83 11 00 c6 c7 21 82 1f | 00 c8 c9 0b 08 0a 47 5a |.....!..|......GZ|
|00003fc0| 5c 5c 08 5c 22 09 5c 22 | 89 12 29 87 22 20 5b 6c |\\.\".\"|..)." [l|
|00003fd0| 65 6e 67 74 68 20 6b 69 | 6c 6c 2d 72 69 6e 67 20 |ength ki|ll-ring |
|00003fe0| 6b 69 6c 6c 2d 72 69 6e | 67 2d 79 61 6e 6b 2d 70 |kill-rin|g-yank-p|
|00003ff0| 6f 69 6e 74 65 72 20 61 | 72 67 20 6e 69 6c 20 7a |ointer a|rg nil z|
|00004000| 65 72 6f 70 20 65 72 72 | 6f 72 20 22 4b 69 6c 6c |erop err|or "Kill|
|00004010| 20 72 69 6e 67 20 69 73 | 20 65 6d 70 74 79 22 20 | ring is| empty" |
|00004020| 6e 74 68 63 64 72 20 25 | 5d 20 37 29 29 0a 0a 28 |nthcdr %|] 7))..(|
|00004030| 64 65 66 75 6e 20 79 61 | 6e 6b 2d 70 6f 70 20 28 |defun ya|nk-pop (|
|00004040| 61 72 67 29 20 22 5c 0a | 52 65 70 6c 61 63 65 20 |arg) "\.|Replace |
|00004050| 6a 75 73 74 2d 79 61 6e | 6b 65 64 20 73 74 72 65 |just-yan|ked stre|
|00004060| 74 63 68 20 6f 66 20 6b | 69 6c 6c 65 64 2d 74 65 |tch of k|illed-te|
|00004070| 78 74 20 77 69 74 68 20 | 61 20 64 69 66 66 65 72 |xt with |a differ|
|00004080| 65 6e 74 20 73 74 72 65 | 74 63 68 2e 0a 54 68 69 |ent stre|tch..Thi|
|00004090| 73 20 63 6f 6d 6d 61 6e | 64 20 69 73 20 61 6c 6c |s comman|d is all|
|000040a0| 6f 77 65 64 20 6f 6e 6c | 79 20 69 6d 6d 65 64 69 |owed onl|y immedi|
|000040b0| 61 74 65 6c 79 20 61 66 | 74 65 72 20 61 20 20 79 |ately af|ter a y|
|000040c0| 61 6e 6b 20 20 6f 72 20 | 61 20 20 79 61 6e 6b 2d |ank or |a yank-|
|000040d0| 70 6f 70 2e 0a 41 74 20 | 73 75 63 68 20 61 20 74 |pop..At |such a t|
|000040e0| 69 6d 65 2c 20 74 68 65 | 20 72 65 67 69 6f 6e 20 |ime, the| region |
|000040f0| 63 6f 6e 74 61 69 6e 73 | 20 61 20 73 74 72 65 74 |contains| a stret|
|00004100| 63 68 20 6f 66 20 72 65 | 69 6e 73 65 72 74 65 64 |ch of re|inserted|
|00004110| 0a 70 72 65 76 69 6f 75 | 73 6c 79 2d 6b 69 6c 6c |.previou|sly-kill|
|00004120| 65 64 20 74 65 78 74 2e | 20 20 79 61 6e 6b 2d 70 |ed text.| yank-p|
|00004130| 6f 70 20 20 64 65 6c 65 | 74 65 73 20 74 68 61 74 |op dele|tes that|
|00004140| 20 74 65 78 74 20 61 6e | 64 20 69 6e 73 65 72 74 | text an|d insert|
|00004150| 73 20 69 6e 20 69 74 73 | 0a 70 6c 61 63 65 20 61 |s in its|.place a|
|00004160| 20 64 69 66 66 65 72 65 | 6e 74 20 73 74 72 65 74 | differe|nt stret|
|00004170| 63 68 20 6f 66 20 6b 69 | 6c 6c 65 64 20 74 65 78 |ch of ki|lled tex|
|00004180| 74 2e 0a 0a 57 69 74 68 | 20 6e 6f 20 61 72 67 75 |t...With| no argu|
|00004190| 6d 65 6e 74 2c 20 74 68 | 65 20 70 72 65 76 69 6f |ment, th|e previo|
|000041a0| 75 73 20 6b 69 6c 6c 20 | 69 73 20 69 6e 73 65 72 |us kill |is inser|
|000041b0| 74 65 64 2e 0a 57 69 74 | 68 20 61 72 67 75 6d 65 |ted..Wit|h argume|
|000041c0| 6e 74 20 6e 2c 20 74 68 | 65 20 6e 27 74 68 20 70 |nt n, th|e n'th p|
|000041d0| 72 65 76 69 6f 75 73 20 | 6b 69 6c 6c 20 69 73 20 |revious |kill is |
|000041e0| 69 6e 73 65 72 74 65 64 | 2e 0a 49 66 20 6e 20 69 |inserted|..If n i|
|000041f0| 73 20 6e 65 67 61 74 69 | 76 65 2c 20 74 68 69 73 |s negati|ve, this|
|00004200| 20 69 73 20 61 20 6d 6f | 72 65 20 72 65 63 65 6e | is a mo|re recen|
|00004210| 74 20 6b 69 6c 6c 2e 0a | 0a 54 68 65 20 73 65 71 |t kill..|.The seq|
|00004220| 75 65 6e 63 65 20 6f 66 | 20 6b 69 6c 6c 73 20 77 |uence of| kills w|
|00004230| 72 61 70 73 20 61 72 6f | 75 6e 64 2c 20 73 6f 20 |raps aro|und, so |
|00004240| 74 68 61 74 20 61 66 74 | 65 72 20 74 68 65 20 6f |that aft|er the o|
|00004250| 6c 64 65 73 74 20 6f 6e | 65 0a 63 6f 6d 65 73 20 |ldest on|e.comes |
|00004260| 74 68 65 20 6e 65 77 65 | 73 74 20 6f 6e 65 2e 22 |the newe|st one."|
|00004270| 20 28 69 6e 74 65 72 61 | 63 74 69 76 65 20 22 2a | (intera|ctive "*|
|00004280| 70 22 29 20 28 62 79 74 | 65 2d 63 6f 64 65 20 22 |p") (byt|e-code "|
|00004290| c5 88 08 c6 3d 3f 85 0c | 00 c7 c8 21 88 c6 89 11 |....=?..|...!....|
|000042a0| 88 60 c9 20 57 1a ca 60 | c9 20 5c 22 88 cb 0b 21 |.`. W..`|. \"...!|
|000042b0| 88 cc 60 21 88 0c 40 63 | 88 0a 85 2e 00 cd 20 29 |..`!..@c|...... )|
|000042c0| 87 22 20 5b 6c 61 73 74 | 2d 63 6f 6d 6d 61 6e 64 |." [last|-command|
|000042d0| 20 74 68 69 73 2d 63 6f | 6d 6d 61 6e 64 20 62 65 | this-co|mmand be|
|000042e0| 66 6f 72 65 20 61 72 67 | 20 6b 69 6c 6c 2d 72 69 |fore arg| kill-ri|
|000042f0| 6e 67 2d 79 61 6e 6b 2d | 70 6f 69 6e 74 65 72 20 |ng-yank-|pointer |
|00004300| 6e 69 6c 20 79 61 6e 6b | 20 65 72 72 6f 72 20 22 |nil yank| error "|
|00004310| 50 72 65 76 69 6f 75 73 | 20 63 6f 6d 6d 61 6e 64 |Previous| command|
|00004320| 20 77 61 73 20 6e 6f 74 | 20 61 20 79 61 6e 6b 22 | was not| a yank"|
|00004330| 20 6d 61 72 6b 20 64 65 | 6c 65 74 65 2d 72 65 67 | mark de|lete-reg|
|00004340| 69 6f 6e 20 72 6f 74 61 | 74 65 2d 79 61 6e 6b 2d |ion rota|te-yank-|
|00004350| 70 6f 69 6e 74 65 72 20 | 73 65 74 2d 6d 61 72 6b |pointer |set-mark|
|00004360| 20 65 78 63 68 61 6e 67 | 65 2d 70 6f 69 6e 74 2d | exchang|e-point-|
|00004370| 61 6e 64 2d 6d 61 72 6b | 5d 20 38 29 29 0a 0a 28 |and-mark|] 8))..(|
|00004380| 64 65 66 75 6e 20 79 61 | 6e 6b 20 28 26 6f 70 74 |defun ya|nk (&opt|
|00004390| 69 6f 6e 61 6c 20 61 72 | 67 29 20 22 5c 0a 52 65 |ional ar|g) "\.Re|
|000043a0| 69 6e 73 65 72 74 20 74 | 68 65 20 6c 61 73 74 20 |insert t|he last |
|000043b0| 73 74 72 65 74 63 68 20 | 6f 66 20 6b 69 6c 6c 65 |stretch |of kille|
|000043c0| 64 20 74 65 78 74 2e 0a | 4d 6f 72 65 20 70 72 65 |d text..|More pre|
|000043d0| 63 69 73 65 6c 79 2c 20 | 72 65 69 6e 73 65 72 74 |cisely, |reinsert|
|000043e0| 20 74 68 65 20 73 74 72 | 65 74 63 68 20 6f 66 20 | the str|etch of |
|000043f0| 6b 69 6c 6c 65 64 20 74 | 65 78 74 20 6d 6f 73 74 |killed t|ext most|
|00004400| 20 72 65 63 65 6e 74 6c | 79 0a 6b 69 6c 6c 65 64 | recentl|y.killed|
|00004410| 20 4f 52 20 79 61 6e 6b | 65 64 2e 0a 57 69 74 68 | OR yank|ed..With|
|00004420| 20 6a 75 73 74 20 43 2d | 55 20 61 73 20 61 72 67 | just C-|U as arg|
|00004430| 75 6d 65 6e 74 2c 20 73 | 61 6d 65 20 62 75 74 20 |ument, s|ame but |
|00004440| 70 75 74 20 70 6f 69 6e | 74 20 69 6e 20 66 72 6f |put poin|t in fro|
|00004450| 6e 74 20 28 61 6e 64 20 | 6d 61 72 6b 20 61 74 20 |nt (and |mark at |
|00004460| 65 6e 64 29 2e 0a 57 69 | 74 68 20 61 72 67 75 6d |end)..Wi|th argum|
|00004470| 65 6e 74 20 6e 2c 20 72 | 65 69 6e 73 65 72 74 20 |ent n, r|einsert |
|00004480| 74 68 65 20 6e 74 68 20 | 6d 6f 73 74 20 72 65 63 |the nth |most rec|
|00004490| 65 6e 74 6c 79 20 6b 69 | 6c 6c 65 64 20 73 74 72 |ently ki|lled str|
|000044a0| 65 74 63 68 20 6f 66 20 | 6b 69 6c 6c 65 64 0a 74 |etch of |killed.t|
|000044b0| 65 78 74 2e 0a 53 65 65 | 20 61 6c 73 6f 20 74 68 |ext..See| also th|
|000044c0| 65 20 63 6f 6d 6d 61 6e | 64 20 5c 5c 5b 79 61 6e |e comman|d \\[yan|
|000044d0| 6b 2d 70 6f 70 5d 2e 22 | 20 28 69 6e 74 65 72 61 |k-pop]."| (intera|
|000044e0| 63 74 69 76 65 20 22 2a | 50 22 29 20 28 62 79 74 |ctive "*|P") (byt|
|000044f0| 65 2d 63 6f 64 65 20 22 | c2 88 c3 20 88 c4 08 3c |e-code "|... ...<|
|00004500| 83 0f 00 c5 82 1b 00 08 | c6 3d 83 19 00 c7 82 1b |........|.=......|
|00004510| 00 08 53 21 88 c8 60 21 | 88 09 40 63 88 08 3a 85 |..S!..`!|..@c..:.|
|00004520| 2c 00 c9 20 87 22 20 5b | 61 72 67 20 6b 69 6c 6c |,.. ." [|arg kill|
|00004530| 2d 72 69 6e 67 2d 79 61 | 6e 6b 2d 70 6f 69 6e 74 |-ring-ya|nk-point|
|00004540| 65 72 20 6e 69 6c 20 63 | 68 65 63 6b 2d 63 6c 69 |er nil c|heck-cli|
|00004550| 70 62 6f 61 72 64 20 72 | 6f 74 61 74 65 2d 79 61 |pboard r|otate-ya|
|00004560| 6e 6b 2d 70 6f 69 6e 74 | 65 72 20 30 20 2d 20 2d |nk-point|er 0 - -|
|00004570| 31 20 70 75 73 68 2d 6d | 61 72 6b 20 65 78 63 68 |1 push-m|ark exch|
|00004580| 61 6e 67 65 2d 70 6f 69 | 6e 74 2d 61 6e 64 2d 6d |ange-poi|nt-and-m|
|00004590| 61 72 6b 5d 20 35 29 29 | 0a 0a 28 64 65 66 75 6e |ark] 5))|..(defun|
|000045a0| 20 69 6e 73 65 72 74 2d | 62 75 66 66 65 72 20 28 | insert-|buffer (|
|000045b0| 62 75 66 66 65 72 29 20 | 22 5c 0a 49 6e 73 65 72 |buffer) |"\.Inser|
|000045c0| 74 20 61 66 74 65 72 20 | 70 6f 69 6e 74 20 74 68 |t after |point th|
|000045d0| 65 20 63 6f 6e 74 65 6e | 74 73 20 6f 66 20 42 55 |e conten|ts of BU|
|000045e0| 46 46 45 52 2e 0a 50 75 | 74 73 20 6d 61 72 6b 20 |FFER..Pu|ts mark |
|000045f0| 61 66 74 65 72 20 74 68 | 65 20 69 6e 73 65 72 74 |after th|e insert|
|00004600| 65 64 20 74 65 78 74 2e | 0a 42 55 46 46 45 52 20 |ed text.|.BUFFER |
|00004610| 6d 61 79 20 62 65 20 61 | 20 62 75 66 66 65 72 20 |may be a| buffer |
|00004620| 6f 72 20 61 20 62 75 66 | 66 65 72 20 6e 61 6d 65 |or a buf|fer name|
|00004630| 2e 22 20 28 69 6e 74 65 | 72 61 63 74 69 76 65 20 |." (inte|ractive |
|00004640| 22 2a 62 49 6e 73 65 72 | 74 20 62 75 66 66 65 72 |"*bInser|t buffer|
|00004650| 3a 20 22 29 20 28 62 79 | 74 65 2d 63 6f 64 65 20 |: ") (by|te-code |
|00004660| 22 c4 88 c5 08 21 86 0d | 00 c6 08 21 89 10 88 c4 |"....!..|...!....|
|00004670| c4 c4 1b 1a 19 8a 8a 08 | 71 88 65 11 64 89 12 29 |........|q.e.d..)|
|00004680| 88 c7 08 09 0a 23 88 60 | 89 13 29 88 c8 0b 21 2b |.....#.`|..)...!+|
|00004690| 87 22 20 5b 62 75 66 66 | 65 72 20 73 74 61 72 74 |." [buff|er start|
|000046a0| 20 65 6e 64 20 6e 65 77 | 6d 61 72 6b 20 6e 69 6c | end new|mark nil|
|000046b0| 20 62 75 66 66 65 72 70 | 20 67 65 74 2d 62 75 66 | bufferp| get-buf|
|000046c0| 66 65 72 20 69 6e 73 65 | 72 74 2d 62 75 66 66 65 |fer inse|rt-buffe|
|000046d0| 72 2d 73 75 62 73 74 72 | 69 6e 67 20 70 75 73 68 |r-substr|ing push|
|000046e0| 2d 6d 61 72 6b 5d 20 36 | 29 29 0a 0a 28 64 65 66 |-mark] 6|))..(def|
|000046f0| 75 6e 20 61 70 70 65 6e | 64 2d 74 6f 2d 62 75 66 |un appen|d-to-buf|
|00004700| 66 65 72 20 28 62 75 66 | 66 65 72 20 73 74 61 72 |fer (buf|fer star|
|00004710| 74 20 65 6e 64 29 20 22 | 5c 0a 41 70 70 65 6e 64 |t end) "|\.Append|
|00004720| 20 74 6f 20 73 70 65 63 | 69 66 69 65 64 20 62 75 | to spec|ified bu|
|00004730| 66 66 65 72 20 74 68 65 | 20 74 65 78 74 20 6f 66 |ffer the| text of|
|00004740| 20 74 68 65 20 72 65 67 | 69 6f 6e 2e 0a 49 74 20 | the reg|ion..It |
|00004750| 69 73 20 69 6e 73 65 72 | 74 65 64 20 69 6e 74 6f |is inser|ted into|
|00004760| 20 74 68 61 74 20 62 75 | 66 66 65 72 20 62 65 66 | that bu|ffer bef|
|00004770| 6f 72 65 20 69 74 73 20 | 70 6f 69 6e 74 2e 0a 0a |ore its |point...|
|00004780| 57 68 65 6e 20 63 61 6c | 6c 69 6e 67 20 66 72 6f |When cal|ling fro|
|00004790| 6d 20 61 20 70 72 6f 67 | 72 61 6d 2c 20 67 69 76 |m a prog|ram, giv|
|000047a0| 65 20 74 68 72 65 65 20 | 61 72 67 75 6d 65 6e 74 |e three |argument|
|000047b0| 73 3a 0a 61 20 62 75 66 | 66 65 72 20 6f 72 20 74 |s:.a buf|fer or t|
|000047c0| 68 65 20 6e 61 6d 65 20 | 6f 66 20 6f 6e 65 2c 20 |he name |of one, |
|000047d0| 61 6e 64 20 74 77 6f 20 | 63 68 61 72 61 63 74 65 |and two |characte|
|000047e0| 72 20 6e 75 6d 62 65 72 | 73 0a 73 70 65 63 69 66 |r number|s.specif|
|000047f0| 79 69 6e 67 20 74 68 65 | 20 70 6f 72 74 69 6f 6e |ying the| portion|
|00004800| 20 6f 66 20 74 68 65 20 | 63 75 72 72 65 6e 74 20 | of the |current |
|00004810| 62 75 66 66 65 72 20 74 | 6f 20 62 65 20 63 6f 70 |buffer t|o be cop|
|00004820| 69 65 64 2e 22 20 28 69 | 6e 74 65 72 61 63 74 69 |ied." (i|nteracti|
|00004830| 76 65 20 22 42 41 70 70 | 65 6e 64 20 74 6f 20 62 |ve "BApp|end to b|
|00004840| 75 66 66 65 72 3a 20 0a | 72 22 29 20 28 62 79 74 |uffer: .|r") (byt|
|00004850| 65 2d 63 6f 64 65 20 22 | c4 88 70 18 8a c5 09 21 |e-code "|..p....!|
|00004860| 71 88 c6 08 0a 0b 23 29 | 29 87 22 20 5b 6f 6c 64 |q.....#)|)." [old|
|00004870| 62 75 66 20 62 75 66 66 | 65 72 20 73 74 61 72 74 |buf buff|er start|
|00004880| 20 65 6e 64 20 6e 69 6c | 20 67 65 74 2d 62 75 66 | end nil| get-buf|
|00004890| 66 65 72 2d 63 72 65 61 | 74 65 20 69 6e 73 65 72 |fer-crea|te inser|
|000048a0| 74 2d 62 75 66 66 65 72 | 2d 73 75 62 73 74 72 69 |t-buffer|-substri|
|000048b0| 6e 67 5d 20 35 29 29 0a | 0a 28 64 65 66 75 6e 20 |ng] 5)).|.(defun |
|000048c0| 70 72 65 70 65 6e 64 2d | 74 6f 2d 62 75 66 66 65 |prepend-|to-buffe|
|000048d0| 72 20 28 62 75 66 66 65 | 72 20 73 74 61 72 74 20 |r (buffe|r start |
|000048e0| 65 6e 64 29 20 22 5c 0a | 50 72 65 70 65 6e 64 20 |end) "\.|Prepend |
|000048f0| 74 6f 20 73 70 65 63 69 | 66 69 65 64 20 62 75 66 |to speci|fied buf|
|00004900| 66 65 72 20 74 68 65 20 | 74 65 78 74 20 6f 66 20 |fer the |text of |
|00004910| 74 68 65 20 72 65 67 69 | 6f 6e 2e 0a 49 74 20 69 |the regi|on..It i|
|00004920| 73 20 69 6e 73 65 72 74 | 65 64 20 69 6e 74 6f 20 |s insert|ed into |
|00004930| 74 68 61 74 20 62 75 66 | 66 65 72 20 61 66 74 65 |that buf|fer afte|
|00004940| 72 20 69 74 73 20 70 6f | 69 6e 74 2e 0a 0a 57 68 |r its po|int...Wh|
|00004950| 65 6e 20 63 61 6c 6c 69 | 6e 67 20 66 72 6f 6d 20 |en calli|ng from |
|00004960| 61 20 70 72 6f 67 72 61 | 6d 2c 20 67 69 76 65 20 |a progra|m, give |
|00004970| 74 68 72 65 65 20 61 72 | 67 75 6d 65 6e 74 73 3a |three ar|guments:|
|00004980| 0a 61 20 62 75 66 66 65 | 72 20 6f 72 20 74 68 65 |.a buffe|r or the|
|00004990| 20 6e 61 6d 65 20 6f 66 | 20 6f 6e 65 2c 20 61 6e | name of| one, an|
|000049a0| 64 20 74 77 6f 20 63 68 | 61 72 61 63 74 65 72 20 |d two ch|aracter |
|000049b0| 6e 75 6d 62 65 72 73 0a | 73 70 65 63 69 66 79 69 |numbers.|specifyi|
|000049c0| 6e 67 20 74 68 65 20 70 | 6f 72 74 69 6f 6e 20 6f |ng the p|ortion o|
|000049d0| 66 20 74 68 65 20 63 75 | 72 72 65 6e 74 20 62 75 |f the cu|rrent bu|
|000049e0| 66 66 65 72 20 74 6f 20 | 62 65 20 63 6f 70 69 65 |ffer to |be copie|
|000049f0| 64 2e 22 20 28 69 6e 74 | 65 72 61 63 74 69 76 65 |d." (int|eractive|
|00004a00| 20 22 42 50 72 65 70 65 | 6e 64 20 74 6f 20 62 75 | "BPrepe|nd to bu|
|00004a10| 66 66 65 72 3a 20 0a 72 | 22 29 20 28 62 79 74 65 |ffer: .r|") (byte|
|00004a20| 2d 63 6f 64 65 20 22 c4 | 88 70 18 8a c5 09 21 71 |-code ".|.p....!q|
|00004a30| 88 8a c6 08 0a 0b 23 29 | 29 29 87 22 20 5b 6f 6c |......#)|))." [ol|
|00004a40| 64 62 75 66 20 62 75 66 | 66 65 72 20 73 74 61 72 |dbuf buf|fer star|
|00004a50| 74 20 65 6e 64 20 6e 69 | 6c 20 67 65 74 2d 62 75 |t end ni|l get-bu|
|00004a60| 66 66 65 72 2d 63 72 65 | 61 74 65 20 69 6e 73 65 |ffer-cre|ate inse|
|00004a70| 72 74 2d 62 75 66 66 65 | 72 2d 73 75 62 73 74 72 |rt-buffe|r-substr|
|00004a80| 69 6e 67 5d 20 35 29 29 | 0a 0a 28 64 65 66 75 6e |ing] 5))|..(defun|
|00004a90| 20 63 6f 70 79 2d 74 6f | 2d 62 75 66 66 65 72 20 | copy-to|-buffer |
|00004aa0| 28 62 75 66 66 65 72 20 | 73 74 61 72 74 20 65 6e |(buffer |start en|
|00004ab0| 64 29 20 22 5c 0a 43 6f | 70 79 20 74 6f 20 73 70 |d) "\.Co|py to sp|
|00004ac0| 65 63 69 66 69 65 64 20 | 62 75 66 66 65 72 20 74 |ecified |buffer t|
|00004ad0| 68 65 20 74 65 78 74 20 | 6f 66 20 74 68 65 20 72 |he text |of the r|
|00004ae0| 65 67 69 6f 6e 2e 0a 49 | 74 20 69 73 20 69 6e 73 |egion..I|t is ins|
|00004af0| 65 72 74 65 64 20 69 6e | 74 6f 20 74 68 61 74 20 |erted in|to that |
|00004b00| 62 75 66 66 65 72 2c 20 | 72 65 70 6c 61 63 69 6e |buffer, |replacin|
|00004b10| 67 20 65 78 69 73 74 69 | 6e 67 20 74 65 78 74 20 |g existi|ng text |
|00004b20| 74 68 65 72 65 2e 0a 0a | 57 68 65 6e 20 63 61 6c |there...|When cal|
|00004b30| 6c 69 6e 67 20 66 72 6f | 6d 20 61 20 70 72 6f 67 |ling fro|m a prog|
|00004b40| 72 61 6d 2c 20 67 69 76 | 65 20 74 68 72 65 65 20 |ram, giv|e three |
|00004b50| 61 72 67 75 6d 65 6e 74 | 73 3a 0a 61 20 62 75 66 |argument|s:.a buf|
|00004b60| 66 65 72 20 6f 72 20 74 | 68 65 20 6e 61 6d 65 20 |fer or t|he name |
|00004b70| 6f 66 20 6f 6e 65 2c 20 | 61 6e 64 20 74 77 6f 20 |of one, |and two |
|00004b80| 63 68 61 72 61 63 74 65 | 72 20 6e 75 6d 62 65 72 |characte|r number|
|00004b90| 73 0a 73 70 65 63 69 66 | 79 69 6e 67 20 74 68 65 |s.specif|ying the|
|00004ba0| 20 70 6f 72 74 69 6f 6e | 20 6f 66 20 74 68 65 20 | portion| of the |
|00004bb0| 63 75 72 72 65 6e 74 20 | 62 75 66 66 65 72 20 74 |current |buffer t|
|00004bc0| 6f 20 62 65 20 63 6f 70 | 69 65 64 2e 22 20 28 69 |o be cop|ied." (i|
|00004bd0| 6e 74 65 72 61 63 74 69 | 76 65 20 22 42 43 6f 70 |nteracti|ve "BCop|
|00004be0| 79 20 74 6f 20 62 75 66 | 66 65 72 3a 20 0a 72 22 |y to buf|fer: .r"|
|00004bf0| 29 20 28 62 79 74 65 2d | 63 6f 64 65 20 22 c4 88 |) (byte-|code "..|
|00004c00| 70 18 8a c5 09 21 71 88 | c6 20 88 8a c7 08 0a 0b |p....!q.|. ......|
|00004c10| 23 29 29 29 87 22 20 5b | 6f 6c 64 62 75 66 20 62 |#)))." [|oldbuf b|
|00004c20| 75 66 66 65 72 20 73 74 | 61 72 74 20 65 6e 64 20 |uffer st|art end |
|00004c30| 6e 69 6c 20 67 65 74 2d | 62 75 66 66 65 72 2d 63 |nil get-|buffer-c|
|00004c40| 72 65 61 74 65 20 65 72 | 61 73 65 2d 62 75 66 66 |reate er|ase-buff|
|00004c50| 65 72 20 69 6e 73 65 72 | 74 2d 62 75 66 66 65 72 |er inser|t-buffer|
|00004c60| 2d 73 75 62 73 74 72 69 | 6e 67 5d 20 36 29 29 0a |-substri|ng] 6)).|
|00004c70| 0a 28 64 65 66 75 6e 20 | 6d 61 72 6b 20 6e 69 6c |.(defun |mark nil|
|00004c80| 20 22 5c 0a 52 65 74 75 | 72 6e 20 74 68 69 73 20 | "\.Retu|rn this |
|00004c90| 62 75 66 66 65 72 27 73 | 20 6d 61 72 6b 20 76 61 |buffer's| mark va|
|00004ca0| 6c 75 65 20 61 73 20 69 | 6e 74 65 67 65 72 2c 20 |lue as i|nteger, |
|00004cb0| 6f 72 20 6e 69 6c 20 69 | 66 20 6e 6f 20 6d 61 72 |or nil i|f no mar|
|00004cc0| 6b 2e 0a 49 66 20 79 6f | 75 20 61 72 65 20 75 73 |k..If yo|u are us|
|00004cd0| 69 6e 67 20 74 68 69 73 | 20 69 6e 20 61 6e 20 65 |ing this| in an e|
|00004ce0| 64 69 74 69 6e 67 20 63 | 6f 6d 6d 61 6e 64 2c 20 |diting c|ommand, |
|00004cf0| 79 6f 75 20 61 72 65 20 | 6d 6f 73 74 20 6c 69 6b |you are |most lik|
|00004d00| 65 6c 79 20 6d 61 6b 69 | 6e 67 0a 61 20 6d 69 73 |ely maki|ng.a mis|
|00004d10| 74 61 6b 65 3b 20 73 65 | 65 20 74 68 65 20 64 6f |take; se|e the do|
|00004d20| 63 75 6d 65 6e 74 61 74 | 69 6f 6e 20 6f 66 20 60 |cumentat|ion of `|
|00004d30| 73 65 74 2d 6d 61 72 6b | 27 2e 22 20 28 62 79 74 |set-mark|'." (byt|
|00004d40| 65 2d 63 6f 64 65 20 22 | c0 c1 20 21 87 22 20 5b |e-code "|.. !." [|
|00004d50| 6d 61 72 6b 65 72 2d 70 | 6f 73 69 74 69 6f 6e 20 |marker-p|osition |
|00004d60| 6d 61 72 6b 2d 6d 61 72 | 6b 65 72 5d 20 33 29 29 |mark-mar|ker] 3))|
|00004d70| 0a 0a 28 64 65 66 75 6e | 20 73 65 74 2d 6d 61 72 |..(defun| set-mar|
|00004d80| 6b 20 28 70 6f 73 29 20 | 22 5c 0a 53 65 74 20 74 |k (pos) |"\.Set t|
|00004d90| 68 69 73 20 62 75 66 66 | 65 72 27 73 20 6d 61 72 |his buff|er's mar|
|00004da0| 6b 20 74 6f 20 50 4f 53 | 2e 20 20 44 6f 6e 27 74 |k to POS|. Don't|
|00004db0| 20 75 73 65 20 74 68 69 | 73 20 66 75 6e 63 74 69 | use thi|s functi|
|00004dc0| 6f 6e 21 0a 54 68 61 74 | 20 69 73 20 74 6f 20 73 |on!.That| is to s|
|00004dd0| 61 79 2c 20 64 6f 6e 27 | 74 20 75 73 65 20 74 68 |ay, don'|t use th|
|00004de0| 69 73 20 66 75 6e 63 74 | 69 6f 6e 20 75 6e 6c 65 |is funct|ion unle|
|00004df0| 73 73 20 79 6f 75 20 77 | 61 6e 74 0a 74 68 65 20 |ss you w|ant.the |
|00004e00| 75 73 65 72 20 74 6f 20 | 73 65 65 20 74 68 61 74 |user to |see that|
|00004e10| 20 74 68 65 20 6d 61 72 | 6b 20 68 61 73 20 6d 6f | the mar|k has mo|
|00004e20| 76 65 64 2c 20 61 6e 64 | 20 79 6f 75 20 77 61 6e |ved, and| you wan|
|00004e30| 74 20 74 68 65 20 70 72 | 65 76 69 6f 75 73 0a 6d |t the pr|evious.m|
|00004e40| 61 72 6b 20 70 6f 73 69 | 74 69 6f 6e 20 74 6f 20 |ark posi|tion to |
|00004e50| 62 65 20 6c 6f 73 74 2e | 0a 0a 4e 6f 72 6d 61 6c |be lost.|..Normal|
|00004e60| 6c 79 2c 20 77 68 65 6e | 20 61 20 6e 65 77 20 6d |ly, when| a new m|
|00004e70| 61 72 6b 20 69 73 20 73 | 65 74 2c 20 74 68 65 20 |ark is s|et, the |
|00004e80| 6f 6c 64 20 6f 6e 65 20 | 73 68 6f 75 6c 64 20 67 |old one |should g|
|00004e90| 6f 20 6f 6e 20 74 68 65 | 20 73 74 61 63 6b 2e 0a |o on the| stack..|
|00004ea0| 54 68 69 73 20 69 73 20 | 77 68 79 20 6d 6f 73 74 |This is |why most|
|00004eb0| 20 61 70 70 6c 69 63 61 | 74 69 6f 6e 73 20 73 68 | applica|tions sh|
|00004ec0| 6f 75 6c 64 20 75 73 65 | 20 70 75 73 68 2d 6d 61 |ould use| push-ma|
|00004ed0| 72 6b 2c 20 6e 6f 74 20 | 73 65 74 2d 6d 61 72 6b |rk, not |set-mark|
|00004ee0| 2e 0a 0a 4e 6f 76 69 63 | 65 20 65 6d 61 63 73 2d |...Novic|e emacs-|
|00004ef0| 6c 69 73 70 20 70 72 6f | 67 72 61 6d 6d 65 72 73 |lisp pro|grammers|
|00004f00| 20 6f 66 74 65 6e 20 74 | 72 79 20 74 6f 20 75 73 | often t|ry to us|
|00004f10| 65 20 74 68 65 20 6d 61 | 72 6b 20 66 6f 72 20 74 |e the ma|rk for t|
|00004f20| 68 65 20 77 72 6f 6e 67 | 0a 70 75 72 70 6f 73 65 |he wrong|.purpose|
|00004f30| 73 2e 20 20 54 68 65 20 | 6d 61 72 6b 20 73 61 76 |s. The |mark sav|
|00004f40| 65 73 20 61 20 6c 6f 63 | 61 74 69 6f 6e 20 66 6f |es a loc|ation fo|
|00004f50| 72 20 74 68 65 20 75 73 | 65 72 27 73 20 63 6f 6e |r the us|er's con|
|00004f60| 76 65 6e 69 65 6e 63 65 | 2e 0a 4d 6f 73 74 20 65 |venience|..Most e|
|00004f70| 64 69 74 69 6e 67 20 63 | 6f 6d 6d 61 6e 64 73 20 |diting c|ommands |
|00004f80| 73 68 6f 75 6c 64 20 6e | 6f 74 20 61 6c 74 65 72 |should n|ot alter|
|00004f90| 20 74 68 65 20 6d 61 72 | 6b 2e 0a 54 6f 20 72 65 | the mar|k..To re|
|00004fa0| 6d 65 6d 62 65 72 20 61 | 20 6c 6f 63 61 74 69 6f |member a| locatio|
|00004fb0| 6e 20 66 6f 72 20 69 6e | 74 65 72 6e 61 6c 20 75 |n for in|ternal u|
|00004fc0| 73 65 20 69 6e 20 74 68 | 65 20 4c 69 73 70 20 70 |se in th|e Lisp p|
|00004fd0| 72 6f 67 72 61 6d 2c 0a | 73 74 6f 72 65 20 69 74 |rogram,.|store it|
|00004fe0| 20 69 6e 20 61 20 4c 69 | 73 70 20 76 61 72 69 61 | in a Li|sp varia|
|00004ff0| 62 6c 65 2e 20 20 45 78 | 61 6d 70 6c 65 3a 0a 0a |ble. Ex|ample:..|
|00005000| 20 20 20 28 6c 65 74 20 | 28 28 62 65 67 20 28 70 | (let |((beg (p|
|00005010| 6f 69 6e 74 29 29 29 20 | 28 66 6f 72 77 61 72 64 |oint))) |(forward|
|00005020| 2d 6c 69 6e 65 20 31 29 | 20 28 64 65 6c 65 74 65 |-line 1)| (delete|
|00005030| 2d 72 65 67 69 6f 6e 20 | 62 65 67 20 28 70 6f 69 |-region |beg (poi|
|00005040| 6e 74 29 29 29 2e 22 20 | 28 62 79 74 65 2d 63 6f |nt)))." |(byte-co|
|00005050| 64 65 20 22 c1 c2 20 08 | 70 23 87 22 20 5b 70 6f |de ".. .|p#." [po|
|00005060| 73 20 73 65 74 2d 6d 61 | 72 6b 65 72 20 6d 61 72 |s set-ma|rker mar|
|00005070| 6b 2d 6d 61 72 6b 65 72 | 5d 20 35 29 29 0a 0a 28 |k-marker|] 5))..(|
|00005080| 64 65 66 76 61 72 20 6d | 61 72 6b 2d 72 69 6e 67 |defvar m|ark-ring|
|00005090| 20 6e 69 6c 20 22 5c 0a | 54 68 65 20 6c 69 73 74 | nil "\.|The list|
|000050a0| 20 6f 66 20 73 61 76 65 | 64 20 66 6f 72 6d 65 72 | of save|d former|
|000050b0| 20 6d 61 72 6b 73 20 6f | 66 20 74 68 65 20 63 75 | marks o|f the cu|
|000050c0| 72 72 65 6e 74 20 62 75 | 66 66 65 72 2c 0a 6d 6f |rrent bu|ffer,.mo|
|000050d0| 73 74 20 72 65 63 65 6e | 74 20 66 69 72 73 74 2e |st recen|t first.|
|000050e0| 22 29 0a 0a 28 6d 61 6b | 65 2d 76 61 72 69 61 62 |")..(mak|e-variab|
|000050f0| 6c 65 2d 62 75 66 66 65 | 72 2d 6c 6f 63 61 6c 20 |le-buffe|r-local |
|00005100| 28 71 75 6f 74 65 20 6d | 61 72 6b 2d 72 69 6e 67 |(quote m|ark-ring|
|00005110| 29 29 0a 0a 28 64 65 66 | 63 6f 6e 73 74 20 6d 61 |))..(def|const ma|
|00005120| 72 6b 2d 72 69 6e 67 2d | 6d 61 78 20 31 36 20 22 |rk-ring-|max 16 "|
|00005130| 5c 0a 2a 4d 61 78 69 6d | 75 6d 20 73 69 7a 65 20 |\.*Maxim|um size |
|00005140| 6f 66 20 6d 61 72 6b 20 | 72 69 6e 67 2e 20 20 53 |of mark |ring. S|
|00005150| 74 61 72 74 20 64 69 73 | 63 61 72 64 69 6e 67 20 |tart dis|carding |
|00005160| 6f 66 66 20 65 6e 64 20 | 69 66 20 67 65 74 73 20 |off end |if gets |
|00005170| 74 68 69 73 20 62 69 67 | 2e 22 29 0a 0a 28 64 65 |this big|.")..(de|
|00005180| 66 75 6e 20 73 65 74 2d | 6d 61 72 6b 2d 63 6f 6d |fun set-|mark-com|
|00005190| 6d 61 6e 64 20 28 61 72 | 67 29 20 22 5c 0a 53 65 |mand (ar|g) "\.Se|
|000051a0| 74 20 6d 61 72 6b 20 61 | 74 20 77 68 65 72 65 20 |t mark a|t where |
|000051b0| 70 6f 69 6e 74 20 69 73 | 2c 20 6f 72 20 6a 75 6d |point is|, or jum|
|000051c0| 70 20 74 6f 20 6d 61 72 | 6b 2e 0a 57 69 74 68 20 |p to mar|k..With |
|000051d0| 6e 6f 20 70 72 65 66 69 | 78 20 61 72 67 75 6d 65 |no prefi|x argume|
|000051e0| 6e 74 2c 20 73 65 74 20 | 6d 61 72 6b 2c 20 61 6e |nt, set |mark, an|
|000051f0| 64 20 70 75 73 68 20 70 | 72 65 76 69 6f 75 73 20 |d push p|revious |
|00005200| 6d 61 72 6b 20 6f 6e 20 | 6d 61 72 6b 20 72 69 6e |mark on |mark rin|
|00005210| 67 2e 0a 57 69 74 68 20 | 61 72 67 75 6d 65 6e 74 |g..With |argument|
|00005220| 2c 20 6a 75 6d 70 20 74 | 6f 20 6d 61 72 6b 2c 20 |, jump t|o mark, |
|00005230| 61 6e 64 20 70 6f 70 20 | 69 6e 74 6f 20 6d 61 72 |and pop |into mar|
|00005240| 6b 20 6f 66 66 20 74 68 | 65 20 6d 61 72 6b 20 72 |k off th|e mark r|
|00005250| 69 6e 67 2e 0a 0a 4e 6f | 76 69 63 65 20 65 6d 61 |ing...No|vice ema|
|00005260| 63 73 2d 6c 69 73 70 20 | 70 72 6f 67 72 61 6d 6d |cs-lisp |programm|
|00005270| 65 72 73 20 6f 66 74 65 | 6e 20 74 72 79 20 74 6f |ers ofte|n try to|
|00005280| 20 75 73 65 20 74 68 65 | 20 6d 61 72 6b 20 66 6f | use the| mark fo|
|00005290| 72 20 74 68 65 20 77 72 | 6f 6e 67 0a 70 75 72 70 |r the wr|ong.purp|
|000052a0| 6f 73 65 73 2e 20 20 53 | 65 65 20 74 68 65 20 64 |oses. S|ee the d|
|000052b0| 6f 63 75 6d 65 6e 74 61 | 74 69 6f 6e 20 6f 66 20 |ocumenta|tion of |
|000052c0| 60 73 65 74 2d 6d 61 72 | 6b 27 20 66 6f 72 20 6d |`set-mar|k' for m|
|000052d0| 6f 72 65 20 69 6e 66 6f | 72 6d 61 74 69 6f 6e 2e |ore info|rmation.|
|000052e0| 22 20 28 69 6e 74 65 72 | 61 63 74 69 76 65 20 22 |" (inter|active "|
|000052f0| 50 22 29 20 28 62 79 74 | 65 2d 63 6f 64 65 20 22 |P") (byt|e-code "|
|00005300| c1 88 08 3f 83 0c 00 c2 | 20 82 1e 00 c3 20 3f 83 |...?....| .... ?.|
|00005310| 18 00 c4 c5 21 82 1e 00 | c3 20 62 88 c6 20 87 22 |....!...|. b.. ."|
|00005320| 20 5b 61 72 67 20 6e 69 | 6c 20 70 75 73 68 2d 6d | [arg ni|l push-m|
|00005330| 61 72 6b 20 6d 61 72 6b | 20 65 72 72 6f 72 20 22 |ark mark| error "|
|00005340| 4e 6f 20 6d 61 72 6b 20 | 73 65 74 20 69 6e 20 74 |No mark |set in t|
|00005350| 68 69 73 20 62 75 66 66 | 65 72 22 20 70 6f 70 2d |his buff|er" pop-|
|00005360| 6d 61 72 6b 5d 20 36 29 | 29 0a 0a 28 64 65 66 75 |mark] 6)|)..(defu|
|00005370| 6e 20 70 75 73 68 2d 6d | 61 72 6b 20 28 26 6f 70 |n push-m|ark (&op|
|00005380| 74 69 6f 6e 61 6c 20 6c | 6f 63 61 74 69 6f 6e 20 |tional l|ocation |
|00005390| 6e 6f 6d 73 67 29 20 22 | 5c 0a 53 65 74 20 6d 61 |nomsg) "|\.Set ma|
|000053a0| 72 6b 20 61 74 20 4c 4f | 43 41 54 49 4f 4e 20 28 |rk at LO|CATION (|
|000053b0| 70 6f 69 6e 74 2c 20 62 | 79 20 64 65 66 61 75 6c |point, b|y defaul|
|000053c0| 74 29 20 61 6e 64 20 70 | 75 73 68 20 6f 6c 64 20 |t) and p|ush old |
|000053d0| 6d 61 72 6b 20 6f 6e 20 | 6d 61 72 6b 20 72 69 6e |mark on |mark rin|
|000053e0| 67 2e 0a 44 69 73 70 6c | 61 79 73 20 5c 22 4d 61 |g..Displ|ays \"Ma|
|000053f0| 72 6b 20 73 65 74 5c 22 | 20 75 6e 6c 65 73 73 20 |rk set\"| unless |
|00005400| 74 68 65 20 6f 70 74 69 | 6f 6e 61 6c 20 73 65 63 |the opti|onal sec|
|00005410| 6f 6e 64 20 61 72 67 20 | 4e 4f 4d 53 47 20 69 73 |ond arg |NOMSG is|
|00005420| 20 6e 6f 6e 2d 6e 69 6c | 2e 0a 0a 4e 6f 76 69 63 | non-nil|...Novic|
|00005430| 65 20 65 6d 61 63 73 2d | 6c 69 73 70 20 70 72 6f |e emacs-|lisp pro|
|00005440| 67 72 61 6d 6d 65 72 73 | 20 6f 66 74 65 6e 20 74 |grammers| often t|
|00005450| 72 79 20 74 6f 20 75 73 | 65 20 74 68 65 20 6d 61 |ry to us|e the ma|
|00005460| 72 6b 20 66 6f 72 20 74 | 68 65 20 77 72 6f 6e 67 |rk for t|he wrong|
|00005470| 0a 70 75 72 70 6f 73 65 | 73 2e 20 20 53 65 65 20 |.purpose|s. See |
|00005480| 74 68 65 20 64 6f 63 75 | 6d 65 6e 74 61 74 69 6f |the docu|mentatio|
|00005490| 6e 20 6f 66 20 60 73 65 | 74 2d 6d 61 72 6b 27 20 |n of `se|t-mark' |
|000054a0| 66 6f 72 20 6d 6f 72 65 | 20 69 6e 66 6f 72 6d 61 |for more| informa|
|000054b0| 74 69 6f 6e 2e 22 20 28 | 62 79 74 65 2d 63 6f 64 |tion." (|byte-cod|
|000054c0| 65 20 22 c6 20 3f 83 0a | 00 c0 82 2b 00 c7 c8 20 |e ". ?..|...+... |
|000054d0| 21 09 42 89 11 88 09 47 | 0a 56 85 2b 00 c9 ca 0a |!.B....G|.V.+....|
|000054e0| 09 5c 22 40 c0 5c 22 88 | cb ca 0a 53 09 5c 22 c0 |.\"@.\".|...S.\".|
|000054f0| 5c 22 88 cc 0b 86 32 00 | 60 21 88 0c 86 46 00 0d |\"....2.|`!...F..|
|00005500| 86 46 00 cd 20 ce 56 86 | 46 00 cf d0 21 87 22 20 |.F.. .V.|F...!." |
|00005510| 5b 6e 69 6c 20 6d 61 72 | 6b 2d 72 69 6e 67 20 6d |[nil mar|k-ring m|
|00005520| 61 72 6b 2d 72 69 6e 67 | 2d 6d 61 78 20 6c 6f 63 |ark-ring|-max loc|
|00005530| 61 74 69 6f 6e 20 6e 6f | 6d 73 67 20 65 78 65 63 |ation no|msg exec|
|00005540| 75 74 69 6e 67 2d 6d 61 | 63 72 6f 20 6d 61 72 6b |uting-ma|cro mark|
|00005550| 20 63 6f 70 79 2d 6d 61 | 72 6b 65 72 20 6d 61 72 | copy-ma|rker mar|
|00005560| 6b 2d 6d 61 72 6b 65 72 | 20 6d 6f 76 65 2d 6d 61 |k-marker| move-ma|
|00005570| 72 6b 65 72 20 6e 74 68 | 63 64 72 20 73 65 74 63 |rker nth|cdr setc|
|00005580| 64 72 20 73 65 74 2d 6d | 61 72 6b 20 6d 69 6e 69 |dr set-m|ark mini|
|00005590| 62 75 66 66 65 72 2d 64 | 65 70 74 68 20 30 20 6d |buffer-d|epth 0 m|
|000055a0| 65 73 73 61 67 65 20 22 | 4d 61 72 6b 20 73 65 74 |essage "|Mark set|
|000055b0| 22 5d 20 31 31 29 29 0a | 0a 28 64 65 66 75 6e 20 |"] 11)).|.(defun |
|000055c0| 70 6f 70 2d 6d 61 72 6b | 20 6e 69 6c 20 22 5c 0a |pop-mark| nil "\.|
|000055d0| 50 6f 70 20 6f 66 66 20 | 6d 61 72 6b 20 72 69 6e |Pop off |mark rin|
|000055e0| 67 20 69 6e 74 6f 20 74 | 68 65 20 62 75 66 66 65 |g into t|he buffe|
|000055f0| 72 27 73 20 61 63 74 75 | 61 6c 20 6d 61 72 6b 2e |r's actu|al mark.|
|00005600| 0a 44 6f 65 73 20 6e 6f | 74 20 73 65 74 20 70 6f |.Does no|t set po|
|00005610| 69 6e 74 2e 20 20 44 6f | 65 73 20 6e 6f 74 68 69 |int. Do|es nothi|
|00005620| 6e 67 20 69 66 20 6d 61 | 72 6b 20 72 69 6e 67 20 |ng if ma|rk ring |
|00005630| 69 73 20 65 6d 70 74 79 | 2e 22 20 28 62 79 74 65 |is empty|." (byte|
|00005640| 2d 63 6f 64 65 20 22 08 | 85 29 00 c2 08 c3 c4 20 |-code ".|.)..... |
|00005650| 21 43 5c 22 89 10 88 c5 | c6 08 40 5c 5c 21 88 c7 |!C\"....|..@\\!..|
|00005660| 08 40 c1 5c 22 88 c8 20 | 3f 85 24 00 c9 20 88 08 |.@.\".. |?.$.. ..|
|00005670| 41 89 10 87 22 20 5b 6d | 61 72 6b 2d 72 69 6e 67 |A..." [m|ark-ring|
|00005680| 20 6e 69 6c 20 6e 63 6f | 6e 63 20 63 6f 70 79 2d | nil nco|nc copy-|
|00005690| 6d 61 72 6b 65 72 20 6d | 61 72 6b 2d 6d 61 72 6b |marker m|ark-mark|
|000056a0| 65 72 20 73 65 74 2d 6d | 61 72 6b 20 30 20 6d 6f |er set-m|ark 0 mo|
|000056b0| 76 65 2d 6d 61 72 6b 65 | 72 20 6d 61 72 6b 20 64 |ve-marke|r mark d|
|000056c0| 69 6e 67 5d 20 39 29 29 | 0a 0a 28 66 73 65 74 20 |ing] 9))|..(fset |
|000056d0| 28 71 75 6f 74 65 20 65 | 78 63 68 61 6e 67 65 2d |(quote e|xchange-|
|000056e0| 64 6f 74 2d 61 6e 64 2d | 6d 61 72 6b 29 20 28 71 |dot-and-|mark) (q|
|000056f0| 75 6f 74 65 20 65 78 63 | 68 61 6e 67 65 2d 70 6f |uote exc|hange-po|
|00005700| 69 6e 74 2d 61 6e 64 2d | 6d 61 72 6b 29 29 0a 0a |int-and-|mark))..|
|00005710| 28 64 65 66 75 6e 20 65 | 78 63 68 61 6e 67 65 2d |(defun e|xchange-|
|00005720| 70 6f 69 6e 74 2d 61 6e | 64 2d 6d 61 72 6b 20 6e |point-an|d-mark n|
|00005730| 69 6c 20 22 5c 0a 50 75 | 74 20 74 68 65 20 6d 61 |il "\.Pu|t the ma|
|00005740| 72 6b 20 77 68 65 72 65 | 20 70 6f 69 6e 74 20 69 |rk where| point i|
|00005750| 73 20 6e 6f 77 2c 20 61 | 6e 64 20 70 6f 69 6e 74 |s now, a|nd point|
|00005760| 20 77 68 65 72 65 20 74 | 68 65 20 6d 61 72 6b 20 | where t|he mark |
|00005770| 69 73 20 6e 6f 77 2e 22 | 20 28 69 6e 74 65 72 61 |is now."| (intera|
|00005780| 63 74 69 76 65 20 6e 69 | 6c 29 20 28 62 79 74 65 |ctive ni|l) (byte|
|00005790| 2d 63 6f 64 65 20 22 c0 | 88 c2 20 19 09 3f 85 0d |-code ".|.. ..?..|
|000057a0| 00 c3 c4 21 88 c5 60 21 | 88 09 62 88 c0 29 87 22 |...!..`!|..b..)."|
|000057b0| 20 5b 6e 69 6c 20 6f 6d | 61 72 6b 20 6d 61 72 6b | [nil om|ark mark|
|000057c0| 20 65 72 72 6f 72 20 22 | 4e 6f 20 6d 61 72 6b 20 | error "|No mark |
|000057d0| 73 65 74 20 69 6e 20 74 | 68 69 73 20 62 75 66 66 |set in t|his buff|
|000057e0| 65 72 22 20 73 65 74 2d | 6d 61 72 6b 5d 20 34 29 |er" set-|mark] 4)|
|000057f0| 29 0a 0a 28 64 65 66 75 | 6e 20 6e 65 78 74 2d 6c |)..(defu|n next-l|
|00005800| 69 6e 65 20 28 61 72 67 | 29 20 22 5c 0a 4d 6f 76 |ine (arg|) "\.Mov|
|00005810| 65 20 63 75 72 73 6f 72 | 20 76 65 72 74 69 63 61 |e cursor| vertica|
|00005820| 6c 6c 79 20 64 6f 77 6e | 20 41 52 47 20 6c 69 6e |lly down| ARG lin|
|00005830| 65 73 2e 0a 49 66 20 74 | 68 65 72 65 20 69 73 20 |es..If t|here is |
|00005840| 6e 6f 20 63 68 61 72 61 | 63 74 65 72 20 69 6e 20 |no chara|cter in |
|00005850| 74 68 65 20 74 61 72 67 | 65 74 20 6c 69 6e 65 20 |the targ|et line |
|00005860| 65 78 61 63 74 6c 79 20 | 75 6e 64 65 72 20 74 68 |exactly |under th|
|00005870| 65 20 63 75 72 72 65 6e | 74 20 63 6f 6c 75 6d 6e |e curren|t column|
|00005880| 2c 0a 74 68 65 20 63 75 | 72 73 6f 72 20 69 73 20 |,.the cu|rsor is |
|00005890| 70 6f 73 69 74 69 6f 6e | 65 64 20 61 66 74 65 72 |position|ed after|
|000058a0| 20 74 68 65 20 63 68 61 | 72 61 63 74 65 72 20 69 | the cha|racter i|
|000058b0| 6e 20 74 68 61 74 20 6c | 69 6e 65 20 77 68 69 63 |n that l|ine whic|
|000058c0| 68 20 73 70 61 6e 73 20 | 74 68 69 73 0a 63 6f 6c |h spans |this.col|
|000058d0| 75 6d 6e 2c 20 6f 72 20 | 61 74 20 74 68 65 20 65 |umn, or |at the e|
|000058e0| 6e 64 20 6f 66 20 74 68 | 65 20 6c 69 6e 65 20 69 |nd of th|e line i|
|000058f0| 66 20 69 74 20 69 73 20 | 6e 6f 74 20 6c 6f 6e 67 |f it is |not long|
|00005900| 20 65 6e 6f 75 67 68 2e | 0a 49 66 20 74 68 65 72 | enough.|.If ther|
|00005910| 65 20 69 73 20 6e 6f 20 | 6c 69 6e 65 20 69 6e 20 |e is no |line in |
|00005920| 74 68 65 20 62 75 66 66 | 65 72 20 61 66 74 65 72 |the buff|er after|
|00005930| 20 74 68 69 73 20 6f 6e | 65 2c 0a 61 20 6e 65 77 | this on|e,.a new|
|00005940| 6c 69 6e 65 20 63 68 61 | 72 61 63 74 65 72 20 69 |line cha|racter i|
|00005950| 73 20 69 6e 73 65 72 74 | 65 64 20 74 6f 20 63 72 |s insert|ed to cr|
|00005960| 65 61 74 65 20 61 20 6c | 69 6e 65 0a 61 6e 64 20 |eate a l|ine.and |
|00005970| 74 68 65 20 63 75 72 73 | 6f 72 20 6d 6f 76 65 73 |the curs|or moves|
|00005980| 20 74 6f 20 74 68 61 74 | 20 6c 69 6e 65 2e 0a 0a | to that| line...|
|00005990| 54 68 65 20 63 6f 6d 6d | 61 6e 64 20 5c 5c 5b 73 |The comm|and \\[s|
|000059a0| 65 74 2d 67 6f 61 6c 2d | 63 6f 6c 75 6d 6e 5d 20 |et-goal-|column] |
|000059b0| 63 61 6e 20 62 65 20 75 | 73 65 64 20 74 6f 20 63 |can be u|sed to c|
|000059c0| 72 65 61 74 65 0a 61 20 | 73 65 6d 69 70 65 72 6d |reate.a |semiperm|
|000059d0| 61 6e 65 6e 74 20 67 6f | 61 6c 20 63 6f 6c 75 6d |anent go|al colum|
|000059e0| 6e 20 74 6f 20 77 68 69 | 63 68 20 74 68 69 73 20 |n to whi|ch this |
|000059f0| 63 6f 6d 6d 61 6e 64 20 | 61 6c 77 61 79 73 20 6d |command |always m|
|00005a00| 6f 76 65 73 2e 0a 54 68 | 65 6e 20 69 74 20 64 6f |oves..Th|en it do|
|00005a10| 65 73 20 6e 6f 74 20 74 | 72 79 20 74 6f 20 6d 6f |es not t|ry to mo|
|00005a20| 76 65 20 76 65 72 74 69 | 63 61 6c 6c 79 2e 0a 0a |ve verti|cally...|
|00005a30| 49 66 20 79 6f 75 20 61 | 72 65 20 74 68 69 6e 6b |If you a|re think|
|00005a40| 69 6e 67 20 6f 66 20 75 | 73 69 6e 67 20 74 68 69 |ing of u|sing thi|
|00005a50| 73 20 69 6e 20 61 20 4c | 69 73 70 20 70 72 6f 67 |s in a L|isp prog|
|00005a60| 72 61 6d 2c 20 63 6f 6e | 73 69 64 65 72 0a 75 73 |ram, con|sider.us|
|00005a70| 69 6e 67 20 60 66 6f 72 | 77 61 72 64 2d 6c 69 6e |ing `for|ward-lin|
|00005a80| 65 27 20 69 6e 73 74 65 | 61 64 2e 20 20 49 74 20 |e' inste|ad. It |
|00005a90| 69 73 20 75 73 75 61 6c | 6c 79 20 65 61 73 69 65 |is usual|ly easie|
|00005aa0| 72 20 74 6f 20 75 73 65 | 0a 61 6e 64 20 6d 6f 72 |r to use|.and mor|
|00005ab0| 65 20 72 65 6c 69 61 62 | 6c 65 20 28 6e 6f 20 64 |e reliab|le (no d|
|00005ac0| 65 70 65 6e 64 65 6e 63 | 65 20 6f 6e 20 67 6f 61 |ependenc|e on goa|
|00005ad0| 6c 20 63 6f 6c 75 6d 6e | 2c 20 65 74 63 2e 29 2e |l column|, etc.).|
|00005ae0| 22 20 28 69 6e 74 65 72 | 61 63 74 69 76 65 20 22 |" (inter|active "|
|00005af0| 70 22 29 20 28 62 79 74 | 65 2d 63 6f 64 65 20 22 |p") (byt|e-code "|
|00005b00| c2 88 08 c3 55 83 2a 00 | 60 19 c4 c3 21 88 09 60 |....U.*.|`...!..`|
|00005b10| 55 86 18 00 68 c5 3d 3f | 83 20 00 c5 63 82 26 00 |U...h.=?|. ..c.&.|
|00005b20| 09 62 88 c6 08 21 29 82 | 2d 00 c6 08 21 88 c2 87 |.b...!).|-...!...|
|00005b30| 22 20 5b 61 72 67 20 6f | 70 6f 69 6e 74 20 6e 69 |" [arg o|point ni|
|00005b40| 6c 20 31 20 66 6f 72 77 | 61 72 64 2d 6c 69 6e 65 |l 1 forw|ard-line|
|00005b50| 20 31 30 20 6e 65 78 74 | 2d 6c 69 6e 65 2d 69 6e | 10 next|-line-in|
|00005b60| 74 65 72 6e 61 6c 5d 20 | 34 29 29 0a 0a 28 64 65 |ternal] |4))..(de|
|00005b70| 66 75 6e 20 70 72 65 76 | 69 6f 75 73 2d 6c 69 6e |fun prev|ious-lin|
|00005b80| 65 20 28 61 72 67 29 20 | 22 5c 0a 4d 6f 76 65 20 |e (arg) |"\.Move |
|00005b90| 63 75 72 73 6f 72 20 76 | 65 72 74 69 63 61 6c 6c |cursor v|erticall|
|00005ba0| 79 20 75 70 20 41 52 47 | 20 6c 69 6e 65 73 2e 0a |y up ARG| lines..|
|00005bb0| 49 66 20 74 68 65 72 65 | 20 69 73 20 6e 6f 20 63 |If there| is no c|
|00005bc0| 68 61 72 61 63 74 65 72 | 20 69 6e 20 74 68 65 20 |haracter| in the |
|00005bd0| 74 61 72 67 65 74 20 6c | 69 6e 65 20 65 78 61 63 |target l|ine exac|
|00005be0| 74 6c 79 20 6f 76 65 72 | 20 74 68 65 20 63 75 72 |tly over| the cur|
|00005bf0| 72 65 6e 74 20 63 6f 6c | 75 6d 6e 2c 0a 74 68 65 |rent col|umn,.the|
|00005c00| 20 63 75 72 73 6f 72 20 | 69 73 20 70 6f 73 69 74 | cursor |is posit|
|00005c10| 69 6f 6e 65 64 20 61 66 | 74 65 72 20 74 68 65 20 |ioned af|ter the |
|00005c20| 63 68 61 72 61 63 74 65 | 72 20 69 6e 20 74 68 61 |characte|r in tha|
|00005c30| 74 20 6c 69 6e 65 20 77 | 68 69 63 68 20 73 70 61 |t line w|hich spa|
|00005c40| 6e 73 20 74 68 69 73 0a | 63 6f 6c 75 6d 6e 2c 20 |ns this.|column, |
|00005c50| 6f 72 20 61 74 20 74 68 | 65 20 65 6e 64 20 6f 66 |or at th|e end of|
|00005c60| 20 74 68 65 20 6c 69 6e | 65 20 69 66 20 69 74 20 | the lin|e if it |
|00005c70| 69 73 20 6e 6f 74 20 6c | 6f 6e 67 20 65 6e 6f 75 |is not l|ong enou|
|00005c80| 67 68 2e 0a 0a 54 68 65 | 20 63 6f 6d 6d 61 6e 64 |gh...The| command|
|00005c90| 20 5c 5c 5b 73 65 74 2d | 67 6f 61 6c 2d 63 6f 6c | \\[set-|goal-col|
|00005ca0| 75 6d 6e 5d 20 63 61 6e | 20 62 65 20 75 73 65 64 |umn] can| be used|
|00005cb0| 20 74 6f 20 63 72 65 61 | 74 65 0a 61 20 73 65 6d | to crea|te.a sem|
|00005cc0| 69 70 65 72 6d 61 6e 65 | 6e 74 20 67 6f 61 6c 20 |ipermane|nt goal |
|00005cd0| 63 6f 6c 75 6d 6e 20 74 | 6f 20 77 68 69 63 68 20 |column t|o which |
|00005ce0| 74 68 69 73 20 63 6f 6d | 6d 61 6e 64 20 61 6c 77 |this com|mand alw|
|00005cf0| 61 79 73 20 6d 6f 76 65 | 73 2e 0a 54 68 65 6e 20 |ays move|s..Then |
|00005d00| 69 74 20 64 6f 65 73 20 | 6e 6f 74 20 74 72 79 20 |it does |not try |
|00005d10| 74 6f 20 6d 6f 76 65 20 | 76 65 72 74 69 63 61 6c |to move |vertical|
|00005d20| 6c 79 2e 0a 0a 49 66 20 | 79 6f 75 20 61 72 65 20 |ly...If |you are |
|00005d30| 74 68 69 6e 6b 69 6e 67 | 20 6f 66 20 75 73 69 6e |thinking| of usin|
|00005d40| 67 20 74 68 69 73 20 69 | 6e 20 61 20 4c 69 73 70 |g this i|n a Lisp|
|00005d50| 20 70 72 6f 67 72 61 6d | 2c 20 63 6f 6e 73 69 64 | program|, consid|
|00005d60| 65 72 20 75 73 69 6e 67 | 0a 60 66 6f 72 77 61 72 |er using|.`forwar|
|00005d70| 64 2d 6c 69 6e 65 27 20 | 77 69 74 68 20 6e 65 67 |d-line' |with neg|
|00005d80| 61 74 69 76 65 20 61 72 | 67 75 6d 65 6e 74 20 69 |ative ar|gument i|
|00005d90| 6e 73 74 65 61 64 2e 2e | 20 20 49 74 20 69 73 20 |nstead..| It is |
|00005da0| 75 73 75 61 6c 6c 79 20 | 65 61 73 69 65 72 0a 74 |usually |easier.t|
|00005db0| 6f 20 75 73 65 20 61 6e | 64 20 6d 6f 72 65 20 72 |o use an|d more r|
|00005dc0| 65 6c 69 61 62 6c 65 20 | 28 6e 6f 20 64 65 70 65 |eliable |(no depe|
|00005dd0| 6e 64 65 6e 63 65 20 6f | 6e 20 67 6f 61 6c 20 63 |ndence o|n goal c|
|00005de0| 6f 6c 75 6d 6e 2c 20 65 | 74 63 2e 29 2e 22 20 28 |olumn, e|tc.)." (|
|00005df0| 69 6e 74 65 72 61 63 74 | 69 76 65 20 22 70 22 29 |interact|ive "p")|
|00005e00| 20 28 62 79 74 65 2d 63 | 6f 64 65 20 22 c1 88 c2 | (byte-c|ode "...|
|00005e10| 08 5b 21 88 c1 87 22 20 | 5b 61 72 67 20 6e 69 6c |.[!..." |[arg nil|
|00005e20| 20 6e 65 78 74 2d 6c 69 | 6e 65 2d 69 6e 74 65 72 | next-li|ne-inter|
|00005e30| 6e 61 6c 5d 20 32 29 29 | 0a 0a 28 64 65 66 63 6f |nal] 2))|..(defco|
|00005e40| 6e 73 74 20 74 72 61 63 | 6b 2d 65 6f 6c 20 6e 69 |nst trac|k-eol ni|
|00005e50| 6c 20 22 5c 0a 2a 4e 6f | 6e 2d 6e 69 6c 20 6d 65 |l "\.*No|n-nil me|
|00005e60| 61 6e 73 20 76 65 72 74 | 69 63 61 6c 20 6d 6f 74 |ans vert|ical mot|
|00005e70| 69 6f 6e 20 73 74 61 72 | 74 69 6e 67 20 61 74 20 |ion star|ting at |
|00005e80| 74 68 65 20 65 6e 64 20 | 6f 66 20 61 20 6c 69 6e |the end |of a lin|
|00005e90| 65 20 73 68 6f 75 6c 64 | 20 6b 65 65 70 20 74 6f |e should| keep to|
|00005ea0| 20 65 6e 64 73 20 6f 66 | 20 6c 69 6e 65 73 2e 0a | ends of| lines..|
|00005eb0| 54 68 69 73 20 6d 65 61 | 6e 73 20 6d 6f 76 69 6e |This mea|ns movin|
|00005ec0| 67 20 74 6f 20 74 68 65 | 20 65 6e 64 20 6f 66 20 |g to the| end of |
|00005ed0| 65 61 63 68 20 6c 69 6e | 65 20 6d 6f 76 65 64 20 |each lin|e moved |
|00005ee0| 6f 6e 74 6f 2e 22 29 0a | 0a 28 64 65 66 76 61 72 |onto.").|.(defvar|
|00005ef0| 20 67 6f 61 6c 2d 63 6f | 6c 75 6d 6e 20 6e 69 6c | goal-co|lumn nil|
|00005f00| 20 22 5c 0a 2a 53 65 6d | 69 70 65 72 6d 61 6e 65 | "\.*Sem|ipermane|
|00005f10| 6e 74 20 67 6f 61 6c 20 | 63 6f 6c 75 6d 6e 20 66 |nt goal |column f|
|00005f20| 6f 72 20 76 65 72 74 69 | 63 61 6c 20 6d 6f 74 69 |or verti|cal moti|
|00005f30| 6f 6e 2c 20 61 73 20 73 | 65 74 20 62 79 20 5c 5c |on, as s|et by \\|
|00005f40| 5b 73 65 74 2d 67 6f 61 | 6c 2d 63 6f 6c 75 6d 6e |[set-goa|l-column|
|00005f50| 5d 2c 20 6f 72 20 6e 69 | 6c 2e 22 29 0a 0a 28 64 |], or ni|l.")..(d|
|00005f60| 65 66 76 61 72 20 74 65 | 6d 70 6f 72 61 72 79 2d |efvar te|mporary-|
|00005f70| 67 6f 61 6c 2d 63 6f 6c | 75 6d 6e 20 30 20 22 5c |goal-col|umn 0 "\|
|00005f80| 0a 43 75 72 72 65 6e 74 | 20 67 6f 61 6c 20 63 6f |.Current| goal co|
|00005f90| 6c 75 6d 6e 20 66 6f 72 | 20 76 65 72 74 69 63 61 |lumn for| vertica|
|00005fa0| 6c 20 6d 6f 74 69 6f 6e | 2e 0a 49 74 20 69 73 20 |l motion|..It is |
|00005fb0| 74 68 65 20 63 6f 6c 75 | 6d 6e 20 77 68 65 72 65 |the colu|mn where|
|00005fc0| 20 70 6f 69 6e 74 20 77 | 61 73 20 61 74 20 74 68 | point w|as at th|
|00005fd0| 65 20 73 74 61 72 74 20 | 6f 66 20 63 75 72 72 65 |e start |of curre|
|00005fe0| 6e 74 20 72 75 6e 20 6f | 66 20 76 65 72 74 69 63 |nt run o|f vertic|
|00005ff0| 61 6c 20 6d 6f 74 69 6f | 6e 20 63 6f 6d 6d 61 6e |al motio|n comman|
|00006000| 64 73 2e 22 29 0a 0a 28 | 64 65 66 75 6e 20 6e 65 |ds.")..(|defun ne|
|00006010| 78 74 2d 6c 69 6e 65 2d | 69 6e 74 65 72 6e 61 6c |xt-line-|internal|
|00006020| 20 28 61 72 67 29 20 28 | 62 79 74 65 2d 63 6f 64 | (arg) (|byte-cod|
|00006030| 65 20 22 08 c8 3d 86 09 | 00 08 c9 3d 3f 85 1c 00 |e "..=..|...=?...|
|00006040| 0a 85 12 00 6c 83 19 00 | c3 82 1a 00 69 89 11 88 |....l...|....i...|
|00006050| ca 0c 21 3f 83 2a 00 cb | 0d 21 82 5a 00 0d cc 56 |..!?.*..|.!.Z...V|
|00006060| 85 44 00 cd ce 21 88 cf | d0 21 88 cb ce 21 88 0d |.D...!..|.!...!..|
|00006070| 53 89 15 88 82 2a 00 88 | 0d cc 57 85 5a 00 cd d0 |S....*..|..W.Z...|
|00006080| 21 88 d1 20 88 0d 54 89 | 15 88 82 45 00 88 0e 06 |!.. ..T.|...E....|
|00006090| 86 61 00 09 c3 3d 83 6b | 00 d2 20 82 73 00 d3 0e |.a...=.k|.. .s...|
|000060a0| 06 86 72 00 09 21 88 c7 | 87 22 20 5b 6c 61 73 74 |..r..!..|." [last|
|000060b0| 2d 63 6f 6d 6d 61 6e 64 | 20 74 65 6d 70 6f 72 61 |-command| tempora|
|000060c0| 72 79 2d 67 6f 61 6c 2d | 63 6f 6c 75 6d 6e 20 74 |ry-goal-|column t|
|000060d0| 72 61 63 6b 2d 65 6f 6c | 20 74 20 73 65 6c 65 63 |rack-eol| t selec|
|000060e0| 74 69 76 65 2d 64 69 73 | 70 6c 61 79 20 61 72 67 |tive-dis|play arg|
|000060f0| 20 67 6f 61 6c 2d 63 6f | 6c 75 6d 6e 20 6e 69 6c | goal-co|lumn nil|
|00006100| 20 6e 65 78 74 2d 6c 69 | 6e 65 20 70 72 65 76 69 | next-li|ne previ|
|00006110| 6f 75 73 2d 6c 69 6e 65 | 20 69 6e 74 65 67 65 72 |ous-line| integer|
|00006120| 70 20 66 6f 72 77 61 72 | 64 2d 6c 69 6e 65 20 30 |p forwar|d-line 0|
|00006130| 20 76 65 72 74 69 63 61 | 6c 2d 6d 6f 74 69 6f 6e | vertica|l-motion|
|00006140| 20 31 20 66 6f 72 77 61 | 72 64 2d 63 68 61 72 20 | 1 forwa|rd-char |
|00006150| 2d 31 20 62 65 67 69 6e | 6e 69 6e 67 2d 6f 66 2d |-1 begin|ning-of-|
|00006160| 6c 69 6e 65 20 65 6e 64 | 2d 6f 66 2d 6c 69 6e 65 |line end|-of-line|
|00006170| 20 6d 6f 76 65 2d 74 6f | 2d 63 6f 6c 75 6d 6e 5d | move-to|-column]|
|00006180| 20 31 30 29 29 0a 0a 28 | 64 65 66 75 6e 20 73 65 | 10))..(|defun se|
|00006190| 74 2d 67 6f 61 6c 2d 63 | 6f 6c 75 6d 6e 20 28 61 |t-goal-c|olumn (a|
|000061a0| 72 67 29 20 22 5c 0a 53 | 65 74 20 74 68 65 20 63 |rg) "\.S|et the c|
|000061b0| 75 72 72 65 6e 74 20 68 | 6f 72 69 7a 6f 6e 74 61 |urrent h|orizonta|
|000061c0| 6c 20 70 6f 73 69 74 69 | 6f 6e 20 61 73 20 61 20 |l positi|on as a |
|000061d0| 67 6f 61 6c 20 66 6f 72 | 20 5c 5c 5b 6e 65 78 74 |goal for| \\[next|
|000061e0| 2d 6c 69 6e 65 5d 20 61 | 6e 64 20 5c 5c 5b 70 72 |-line] a|nd \\[pr|
|000061f0| 65 76 69 6f 75 73 2d 6c | 69 6e 65 5d 2e 0a 54 68 |evious-l|ine]..Th|
|00006200| 6f 73 65 20 63 6f 6d 6d | 61 6e 64 73 20 77 69 6c |ose comm|ands wil|
|00006210| 6c 20 6d 6f 76 65 20 74 | 6f 20 74 68 69 73 20 70 |l move t|o this p|
|00006220| 6f 73 69 74 69 6f 6e 20 | 69 6e 20 74 68 65 20 6c |osition |in the l|
|00006230| 69 6e 65 20 6d 6f 76 65 | 64 20 74 6f 0a 72 61 74 |ine move|d to.rat|
|00006240| 68 65 72 20 74 68 61 6e | 20 74 72 79 69 6e 67 20 |her than| trying |
|00006250| 74 6f 20 6b 65 65 70 20 | 74 68 65 20 73 61 6d 65 |to keep |the same|
|00006260| 20 68 6f 72 69 7a 6f 6e | 74 61 6c 20 70 6f 73 69 | horizon|tal posi|
|00006270| 74 69 6f 6e 2e 0a 57 69 | 74 68 20 61 20 6e 6f 6e |tion..Wi|th a non|
|00006280| 2d 6e 69 6c 20 61 72 67 | 75 6d 65 6e 74 2c 20 63 |-nil arg|ument, c|
|00006290| 6c 65 61 72 73 20 6f 75 | 74 20 74 68 65 20 67 6f |lears ou|t the go|
|000062a0| 61 6c 20 63 6f 6c 75 6d | 6e 0a 73 6f 20 74 68 61 |al colum|n.so tha|
|000062b0| 74 20 5c 5c 5b 6e 65 78 | 74 2d 6c 69 6e 65 5d 20 |t \\[nex|t-line] |
|000062c0| 61 6e 64 20 5c 5c 5b 70 | 72 65 76 69 6f 75 73 2d |and \\[p|revious-|
|000062d0| 6c 69 6e 65 5d 20 72 65 | 73 75 6d 65 20 76 65 72 |line] re|sume ver|
|000062e0| 74 69 63 61 6c 20 6d 6f | 74 69 6f 6e 2e 22 20 28 |tical mo|tion." (|
|000062f0| 69 6e 74 65 72 61 63 74 | 69 76 65 20 22 50 22 29 |interact|ive "P")|
|00006300| 20 28 62 79 74 65 2d 63 | 6f 64 65 20 22 c2 88 08 | (byte-c|ode "...|
|00006310| 83 10 00 c2 89 11 88 c3 | c4 21 82 1a 00 69 89 11 |........|.!...i..|
|00006320| 88 c3 c5 c6 21 09 5c 22 | 88 c2 87 22 20 5b 61 72 |....!.\"|..." [ar|
|00006330| 67 20 67 6f 61 6c 2d 63 | 6f 6c 75 6d 6e 20 6e 69 |g goal-c|olumn ni|
|00006340| 6c 20 6d 65 73 73 61 67 | 65 20 22 4e 6f 20 67 6f |l messag|e "No go|
|00006350| 61 6c 20 63 6f 6c 75 6d | 6e 22 20 73 75 62 73 74 |al colum|n" subst|
|00006360| 69 74 75 74 65 2d 63 6f | 6d 6d 61 6e 64 2d 6b 65 |itute-co|mmand-ke|
|00006370| 79 73 20 22 47 6f 61 6c | 20 63 6f 6c 75 6d 6e 20 |ys "Goal| column |
|00006380| 25 64 20 28 75 73 65 20 | 5c 5c 5b 73 65 74 2d 67 |%d (use |\\[set-g|
|00006390| 6f 61 6c 2d 63 6f 6c 75 | 6d 6e 5d 20 77 69 74 68 |oal-colu|mn] with|
|000063a0| 20 61 6e 20 61 72 67 20 | 74 6f 20 75 6e 73 65 74 | an arg |to unset|
|000063b0| 20 69 74 29 22 5d 20 35 | 29 29 0a 0a 28 64 65 66 | it)"] 5|))..(def|
|000063c0| 75 6e 20 74 72 61 6e 73 | 70 6f 73 65 2d 63 68 61 |un trans|pose-cha|
|000063d0| 72 73 20 28 61 72 67 29 | 20 22 5c 0a 49 6e 74 65 |rs (arg)| "\.Inte|
|000063e0| 72 63 68 61 6e 67 65 20 | 63 68 61 72 61 63 74 65 |rchange |characte|
|000063f0| 72 73 20 61 72 6f 75 6e | 64 20 70 6f 69 6e 74 2c |rs aroun|d point,|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.